|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--com.sleepycat.db.DbException
This information describes the DbException class and how it is used by the various Berkeley DB classes.
Most methods in the Berkeley DB classes throw an exception when an error occurs. A DbException object contains an informational string, an errno, and a reference to the environment from which the exception was thrown.
Some methods may return non-zero 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, Db.get
returns Db.DB_NOTFOUND when a requested key does not appear in the database.
Constructor Summary | |
DbException(String s)
The DbException constructor returns an instance of the DbException class containing the string. |
|
DbException(String s,
int errno)
The DbException constructor returns an instance of the DbException class containing the string and the encapsulated errno. |
|
DbException(String s,
int errno,
DbEnv dbenv)
The DbException constructor returns an instance of the DbException class containing the string, the encapsulated errno, and the database environment. |
Method Summary | |
int |
get_errno()
Deprecated. As of Berkeley DB 4.2, replaced by getErrno() |
DbEnv |
getDbEnv()
The DbException.getDbEnv method returns the database environment. |
int |
getErrno()
The DbException.getErrno method returns the error value. |
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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DbException(String s)
s
- specifies a message describing the exception.public DbException(String s, int errno)
s
- specifies a message describing the exception.errno
- specifies an error code.public DbException(String s, int errno, DbEnv dbenv)
s
- specifies a message describing the exception.errno
- specifies an error code.dbenv
- the database environment where the exception occurred.Method Detail |
public DbEnv getDbEnv()
public int getErrno()
public int get_errno()
getErrno()
public String toString()
toString
in class Throwable
|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |