Provider-specific exceptions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Provider-specific exceptions

Mateusz Loskot
Hi,

Is it a good idea to define a provider-specific type of exception
derived from FDO exceptions?

For example, I'd like to replace all throws of FdoException
with PostGisException, that is defined as

class PostGisException : public FdoException;

Similarly, I'd like to have specialized exceptions for command,
connection, etc.

The main reason of this idea is that I'd like to attach fdopostgis
private logging mechanism to these connections, so if exception is
thrown, I get some details into log file.
I also wonder, is it is possible to get connection type details
from the Map 3D or MapGuide?

For example, if I get an exception in the Map 3D and I see "empty
connection string" message, I don't see any details if the connection
comes from a provider or it comes from a client.

In XML logs from the Map 3D, I see some attributes, for example:

<Error code="1" type="13" dispensation="1" occurrence="1">

Do these attributes (code, type) indicate anything about type and
source (client, provider) of an exception?


Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals