com.sleepycat.je
Class DatabaseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sleepycat.je.DatabaseException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
OperationFailureException, RepGroupImpl.NodeConflictException, RunRecoveryException

public abstract class DatabaseException
extends RuntimeException

The root of all BDB JE-defined exceptions.

Exceptions thrown by BDB JE fall into three categories.

  1. When a method is used incorrectly as the result of an application programming error, a standard Java runtime exception is thrown: IllegalArgumentException, IllegalStateException or UnsupportedOperationException. These exceptions have the standard meaning defined by their javadoc. Note that JE throws IllegalArgumentException rather than NullPointerException when a required parameter is null.
  2. When an operation failure occurs, OperationFailureException or one of its subclasses is thrown. See OperationFailureException for details.
  3. When an Environment failure occurs, EnvironmentFailureException or one of its subclasses is thrown. See EnvironmentFailureException for details.

OperationFailureException and EnvironmentFailureException are the only two direct subclasses of DatabaseException.

(Actually the above statement is not strictly correct. EnvironmentFailureException extends RunRecoveryException which extends DatabaseException. RunRecoveryException exists for backward compatibility and has been deprecated. EnvironmentFailureException should be used instead.)

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 message)
          For internal use only.
DatabaseException(String message, Throwable t)
          For internal use only.
DatabaseException(Throwable t)
          For internal use only.
 
Method Summary
 void addErrorMessage(String newExtraInfo)
          For internal use only.
 String getMessage()
           
static String getVersionHeader()
          For internal use only.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseException

public DatabaseException(Throwable t)
For internal use only.


DatabaseException

public DatabaseException(String message)
For internal use only.


DatabaseException

public DatabaseException(String message,
                         Throwable t)
For internal use only.

Method Detail

getVersionHeader

public static String getVersionHeader()
For internal use only.


addErrorMessage

public void addErrorMessage(String newExtraInfo)
For internal use only.

Parameters:
newExtraInfo - the message to add, not including separator space.

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable


Copyright (c) 2004-2010 Oracle. All rights reserved.