Package com.sleepycat.db
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
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 Summary
ConstructorsConstructorDescriptionConstruct an exception with the specified message.DatabaseException(String s, int errno) Construct an exception with the specified message and error number.DatabaseException(String s, int errno, Environment dbenv) Construct an exception with the specified message and error number associated with a database environment handle.Construct an exception with the specified cause exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
DatabaseException
Construct an exception with the specified cause exception. -
DatabaseException
Construct an exception with the specified message. -
DatabaseException
Construct an exception with the specified message and error number. -
DatabaseException
Construct an exception with the specified message and error number associated with a database environment handle.
-
-
Method Details
-
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
-