Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 5.3.28
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

    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:
  Serialized Form

Constructor Summary
`DatabaseException(String s)` Construct 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.
`DatabaseException(Throwable t)` Construct an exception with the specified cause exception.

Method Summary
`Environment` | `getEnvironment()` Return the environment in which the exception occurred.
`int` | `getErrno()` Get the error number associated with this exception.
`String` | `toString()`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### 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 Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 5.3.28
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved.