SqueakDBX - Error handling
Last updated at 11:54 pm UTC on 4 April 2009
SqueakDBX can have errors due to:
- Database client library errors (for SqueakDBX this is an OpenDBXError):
- OpenDBX errors (for SqueakDBX this is an OpenDBXError)
- SqueakDBX errors: validations we do in SqueakDBX.
The client or user of OpenDBX cannot know if an error was thrown by the client library or by openDBX itself. This is why in SqueakDBX we represent them with the same error class.
Errors we manage in SqueakDBX:
- SqueakDBXError: thrown when squeakDBX errors occur.
- DBXRecoverableError: A recoverable openDBXError. If you get this error, for example, you must continue iterating results. You can keep working with that connection or resultset.
- DBXFatalError: A fatal openDBXError. For example, the connection was lost. In this case, SqueakDBX automatically disconnect and free all resources. Yo don't have to do anything.
- OpenDBXError: This is a parent of DBXRecoverableError and DBXFatalError. This is in case you want to catch any of a OpenDBXError
- DBXError: This is the parent of all SqueakDBX errors. This is in case you want to catch any SqueakDBX error.
In all cases, SqueakDBX throws an DBXError with the associated message.