[fusion-trac] #270: Fusion reports unreadable error message

Fusion trac_fusion at osgeo.org
Mon Jul 20 06:00:11 EDT 2009


#270: Fusion reports unreadable error message
----------------------------+-----------------------------------------------
   Reporter:  christinebao  |       Owner:  madair
       Type:  defect        |      Status:  new   
   Priority:  P2            |   Milestone:  Future
  Component:  Widgets       |     Version:  1.1.1 
   Severity:  Major         |    Keywords:        
External_id:                |       State:  New   
    Browser:  All           |          Os:  All   
----------------------------+-----------------------------------------------
 MapGuide customers report a severe defect that Flexible Web Layout reports
 unreadable error message.

 For example, if the server is down while user do operation, (s)he will get
 a dialog with long error messages: "FATAL: xml2json: invalid XML document:
 MgConnectionFailedException :
 http://127.0.0.1/mapguide2010/mapagent/mapagent.fcgi?version=1.0.0&locale=en&clientagent=Fusion%20Viewer&operation=QUERYMAPFEATURES&session=
 40d3e074-3ee5-102c-8000-
 005056c00008_en_7F0000010AFC0AFB0AFA&mapname=Sheboygan4a3b609791c82&geometry=POLYGON((-87.730254250931%2043.73763292302%2C%
 20-87.730254250931%2043.737069942268%2C%20-
 87.729691270179%2043.737069942268%2C%20-
 87.729691270179%2043.73763292302%2C%20-
 87.730254250931%2043.73763292302))&maxFeatures=1&persist=0&selectionVariant=INTERSECTS&layerNames=&layerAttributeFilter=5
 type=0".

 This error message is helpless for end users. Customers report that they
 want a more user friendly message.

 This message is from Fusion error handling code (fusion.js line 647)[[BR]]
 {{{
             if (r.status >= 400) {
                 Fusion.reportError(new Fusion.Error(Fusion.Error.FATAL,
                   'xml2json: invalid XML document: ' + r.statusText  + " :
 " + r.request.url));
                 return;
             }
 }}}

 r.statusText is exception type from MapGuide, for example
 MgConnectionFailedException.[[BR]]
 r.request.url is the long URL.

 To improve this:[[BR]]
 1. MapGuide should set the exception message instead of exception type in
 r.statusText. For example, r.statusText should be "Cannot establish
 connection" instead of "MgConnectionFailedException". These messages are
 localized and readable to end users.[[BR]]
 2. Fusion should modify the code of error handling:
 {{{
             if (r.status >= 400) {
                 Fusion.reportError(new Fusion.Error(Fusion.Error.FATAL,
                   + r.statusText));
                 return;
             }

 }}}

 By doing so end user can get a readable error message. For example "FATAL:
 Cannot establish connection"

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/270>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.


More information about the fusion-trac mailing list