Library Version 18.1.40

Chapter 29. Dbstl Exception Classes
Prev |  | Next

## Chapter 29. Dbstl Exception Classes

dbstl throws several types of exceptions on several kinds of errors, the exception classes form a class hiarachy.

First, there is the DbstlException , which is the base class for all types of dbstl specific concrete exception classes. DbstlException inherits from the class DbException of Berkeley DB C++ API. Since DbException class inherits from C++ STL exception base class std::exception, you can make use of all Berkeley DB C++ and dbstl API exceptions in the same way you use the C++ std::exception class.

Besides exceptions of DbstlException and its subclasses, dbstl may also throw exceptions of DbException and its subclasses, which happens when a Berkeley DB call failed. So you should use the same way you catch Berkeley DB C++ API exceptions when you want to catch exceptions throw by Berkeley DB operations.

When an exception occurs, dbstl initialize an local exception object on the stack and throws the exception object, so you should catch an exception like this:

try { dbstl operations } catch(DbstlException ex){ Exception handling throw ex; // Optionally throw ex again }

#### Public Members

Member | Description
--- | ---
DbstlException | DbstlException
NotEnoughMemoryException | NotEnoughMemoryException
InvalidIteratorException | InvalidIteratorException
InvalidCursorException | InvalidCursorException
InvalidDbtException | InvalidDbtException
FailedAssertionException | FailedAssertionException
NoSuchKeyException | NoSuchKeyException
InvalidArgumentException | InvalidArgumentException
NotSupportedException | NotSupportedException
InvalidFunctionCall | InvalidFunctionCall

#### Group

None

Prev |  | Next
no_read_modify_write | Home | Chapter 30. DbstlException