public abstract class DatabaseException
extends java.lang.RuntimeException
Exceptions thrown by BDB JE fall into three categories.
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.
OperationFailureException or
one of its subclasses is thrown. See OperationFailureException for
details.
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.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getMessage() |
Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.