The Database Template Library (DTL) attempts to be robust in the services it provides. To be robust, a piece of software must maintain uncorrputed data structures and recover to resume normal execution if possible in the face of errors. Errors must be reported in a clear manner and allow the user to track down exactly what went wrong in the running of the program. In addition, the user should have some control over what kind of behavior will take place if an error is encountered. DTL addresses these issues by providing:
DBException: describes problems that occur either at the API level or the ODBC/database level dealing with reading or writing to the database, either in IndexedDBView, DBView, or DBStmts (or their iterators).
ETIException: gives an error message about what went wrong with the extended type information provided for SQL <---> C type mappings, usually unrecognized types.
ValidityException: describes errors thrown from ValidatedObject's (specifically for DBConnection and DBStmt objects), indicating the object has hit an invalid state and cannot be recovered without a call to the virtual method ValidatedObject::revalidate().
thrown for errors that occur with variant objects such as
variant_row, variant_fields, and IOHandlers (handlers
are implemented as variant objects). If we can't find a
member such as a function name or cast properly, then we
throw this exception.
More information and examples on the above items can be found in the "Exception Safety in DTL" document.
Copyright © 2002, Michael Gradman and Corwin Joy.
Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Corwin Joy and Michael Gradman make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
This site written using the ORB.