Class DatabaseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.sleepycat.db.DatabaseException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DeadlockException, HeapFullException, IndexNotAvailableException, MemoryException, ReplicationDuplicateMasterException, ReplicationHandleDeadException, ReplicationHoldElectionException, ReplicationJoinFailureException, ReplicationLeaseExpiredException, ReplicationLockoutException, ReplicationSiteUnavailableException, RunRecoveryException, StoreExistsException, StoreNotFoundException, VersionMismatchException

public class DatabaseException extends Exception
The root of all database exceptions.

Note that in some cases, certain methods return status values without issuing an exception. This occurs in situations that are not normally considered an error, but when some informational status is returned. For example, Database.get returns OperationStatus.NOTFOUND when a requested key does not appear in the database.

See Also:
  • Constructor Details

    • DatabaseException

      public DatabaseException(Throwable t)
      Construct an exception with the specified cause exception.
    • DatabaseException

      public DatabaseException(String s)
      Construct an exception with the specified message.
    • DatabaseException

      public DatabaseException(String s, int errno)
      Construct an exception with the specified message and error number.
    • DatabaseException

      public DatabaseException(String s, int errno, Environment dbenv)
      Construct an exception with the specified message and error number associated with a database environment handle.
  • Method Details

    • getEnvironment

      public Environment getEnvironment()
      Return the environment in which the exception occurred.

      This method may be called at any time during the life of the application.

      Returns:
      The environment in which the exception occurred.
    • getErrno

      public int getErrno()
      Get the error number associated with this exception.

      Note that error numbers can be returned from system calls and are system-specific.

    • toString

      public String toString()
      Overrides:
      toString in class Throwable