|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.sleepycat.db.DbException
public class 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(java.lang.String s)
The DbException constructor returns an instance of the DbException class containing the string. |
|
DbException(java.lang.String s,
int errno)
The DbException constructor returns an instance of the DbException class containing the string and the encapsulated errno. |
|
DbException(java.lang.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. |
java.lang.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 |
---|
public DbException(java.lang.String s)
s
- specifies a message describing the exception.public DbException(java.lang.String s, int errno)
s
- specifies a message describing the exception.errno
- specifies an error code.public DbException(java.lang.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 java.lang.String toString()
toString
in class java.lang.Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |