ErrorHandler (Oracle - Berkeley DB Java API)
Keywords: com.sleepycat.db.ErrorHandler interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 4.6.21
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.db
Interface ErrorHandler

    public interface ErrorHandler

An interface specifying a callback function to be called when an error occurs in the Berkeley DB library.

Method Summary
`void` | `error(Environment environment, String errpfx, String msg)` A callback function to be called when an error occurs in the Berkeley DB library.

Method Detail

### error

    void error(Environment environment,
               String errpfx,
               String msg)

  A callback function to be called when an error occurs in the Berkeley DB library.

  When an error occurs in the Berkeley DB library, an exception is thrown. In some cases, however, the exception may be insufficient to completely describe the cause of the error, especially during initial application debugging.

  The `EnvironmentConfig.setErrorHandler` and `DatabaseConfig.setErrorHandler` methods are used to enhance the mechanism for reporting error messages to the application. In some cases, when an error occurs, Berkeley DB will invoke the ErrorHandler's object error method. It is up to this method to display the error message in an appropriate manner.

  Parameters:
    `environment` - The enclosing database environment handle.

    `errpfx` - The prefix string, as previously configured by `EnvironmentConfig.setErrorPrefix` or `DatabaseConfig.setErrorPrefix`.

    `msg` - An error message string.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 4.6.21
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996,2007 Oracle. All rights reserved.