You are here: Advanced Features > Exception Handling > Exception Types

Exception Types

Using db4o you will have to deal with db4o-specific exceptions and system exceptions thrown directly out of db4o.

db4o-exceptions are chained; you can get the cause of the exception using:

c#:

db4oException.Source;

VB:

db4oException.Source;

In order to see all db4o-specific exceptions you can examine the hierarchy of Db4oException class. Currently the following exceptions are available:

Db4oException - db4o exception wrapper: Exceptions occurring during internal processing will be proliferated to the client calling code encapsulated in an exception of this type.

BackupInProgressException - An exception to be thrown when another process is already busy with the backup.

ConstraintViolationException - Base class for all constraint violations.

UniqueFieldValueConstraintViolationException - An exception which will be thrown when the unique constrain is violated.

DatabaseClosedException - An exception to be thrown when the database was closed or failed to open.

DatabaseFileLockedException - This exception is thrown during any of db4o open calls if the database file is locked by another process.

DatabaseMaximumSizeReachedException - This exception is thrown if the database size is bigger than possible. See "Increasing The Maximum Database File Size"

DatabaseReadOnlyException - This exception is thrown when a write operation was attempted on a database in read-only mode.

GlobalOnlyConfigException - This exception is thrown when you try to change a setting on a open object container, but this setting cannot be changed at runtime.

IncompatibleFileFormatException - An exception to be thrown when an open operation is attempted on a file(database), which format is incompatible with the current version of db4o.

InvalidIDException - an exception to be thrown when an ID format supplied to #bind or #getById methods is incorrect.

InvalidPasswordException - This exception is thrown when a client tries to connect to a server with the wrong password.

EventException - This exception is thrown when a exception is thrown in a event callback.

OldFormatException - An exception to be thrown when an old file format was detected and the file could not be open.

ReflectException - An exception to be thrown when a class can not be stored or instantiated by current db4o reflector.

ReplicationConflictException - an exception to be thrown when a conflict occurs and no ReplicationEventListener is specified.