The root of all BDB JE-defined exceptions.
Exceptions thrown by BDB JE fall into three categories.
- When a method is used incorrectly as the result of an application programming error, a standard Java runtime exception is thrown: {@link IllegalArgumentException}, {@link IllegalStateException} or {@link UnsupportedOperationException}. These exceptions have the standard meaning defined by their javadoc. Note that JE throws {@link IllegalArgumentException} rather than {@link NullPointerException} when arequired parameter is null.
- When an operation failure occurs, {@link OperationFailureException} orone of its subclasses is thrown. See {@link OperationFailureException} fordetails.
- When an {@code Environment} failure occurs, {@link EnvironmentFailureException} or one of its subclasses is thrown. See {@link EnvironmentFailureException} for details.
{@link OperationFailureException} and {@link EnvironmentFailureException}are the only two direct subclasses of {@code DatabaseException}.
(Actually the above statement is not strictly correct. {@link EnvironmentFailureException} extends {@link RunRecoveryException} whichextends {@code DatabaseException}. {@link RunRecoveryException} exists forbackward compatibility and has been deprecated. {@link 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, {@link com.sleepycat.je.Database#get Database.get} returns {@link com.sleepycat.je.OperationStatus#NOTFOUND OperationStatus.NOTFOUND} when arequested key does not appear in the database.