[mapguide-internals] Exception in FeatureReader

Haris Kurtagic haris at sl-king.com
Tue May 5 14:55:54 EDT 2009


It seems there is wrong exception handled in RSMgFeatureReader class.

It is demonstrated in such way that exceptions generated inside FDO
provider reader will not be properly handled inside MG, inside Stylizer.

It means in MG log real descritpion of error will not be written (only
unclasified exception).


Reason for this is that in RSMgFeatureReader MG exception is converted
back to FDO exception which is not then undrstood by stylizer.

This conversion is done in macro and suprisngly it works exactly oposite
of what is written in comment lines in RSMgFeatureReader.cpp

//we want to catch the MgException and rethrow a FdoException which

//the Stylizer knows how to catch and release. It does not know about

//MgExceptions so it can't properly release them

#define RSFR_TRY() try {

#define RSFR_CATCH()   }                                \

                       catch (MgException* ex)          \

                       {                                \

                           ex->Release();               \

                           throw FdoException::Create();\



FdoException is not then caught by stylizer and unclasified exception
goes into log file. 


I was testing this against 2.0.2 and wanted to check with trunk but
osgeo site looks dead right now.



More information about the mapguide-internals mailing list