[mapguide][MG150][New] Need a try / catchall mechanism in SWIG generated wrapper co...
Alain Lebatard
alain.lebatard at autodesk.com
Tue Mar 21 12:36:45 EST 2006
You can view the artifact detail at the following URL:
https://mapguide.osgeo.org/servlets/Scarab/id/MG150
Type
Enhancement
Artifact ID
MG150 (Need a try / catchall mechanism in SWIG generated wrapper code)
Reported by
Alain Lebatard
alainlebatard (alain.lebatard at autodesk.com)
New artifact details:
---------------------------------------------------------
- Artifact Status set to new value
New
- Artifact created
- Summary set to new value
Need a try / catchall mechanism in SWIG generated wrapper code
- Justification set to new value
When a MapGuide API function throws a generic C++ exception, the wrapper code does not catch it. This exception will bubble up to the application server which, depending on its implementation might crash. This type of exception crashes the Tomcat server for example. By catching all exceptions in the proxy code, we give the user code an opportunity to catch the exception, avoid such crashes.
- Description set to new value
The SWIG generated code for PHP/Java/.NET currently catches all application exceptions that can be thrown by any wrapped C++ method, but does not catch C++ exception that are not part of the MgException class hierarchy.
We should wrap these exception into an MgUnspecifiedException. It will not contain meaningful information, particularly it will stack stack frame information, but at least user code will get the chance to catch it and thus prevent the application to crash.
---------------------------------------------------------
This message was automatically generated by Project Tracker.
More information about the Mapguide_issues
mailing list