June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db_cxx.h> class DbException { DbException(int err); DbException(const char *description); DbException(const char *prefix, int err); DbException(const char *prefix1, const char *prefix2, int err); };
This manual page describes the DbException class and how it is used by the various Berkeley DB classes.
Most methods in the Berkeley DB classes return an int, but also throw an exception. This allows for two different error behaviors. By default, the Berkeley DB C++ API is configured to throw an exception whenever a serious error occurs. This generally allows for cleaner logic for transaction processing because a try block can surround a single transaction. Alternatively, Berkeley DB can be configured to not throw ...