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

## com.sleepycat.db
Interface PanicHandler

public interface PanicHandler

An interface specifying a function to be called if the database environment panics.

Method Summary
`void` | `panic(Environment environment, DatabaseException e)` A function to be called if the database environment panics.

Method Detail

### panic

    public void panic(Environment environment,
                      DatabaseException e)

  A function to be called if the database environment panics.

  Errors can occur in the Berkeley DB library where the only solution is to shut down the application and run recovery (for example, if Berkeley DB is unable to allocate heap memory). In such cases, the Berkeley DB methods will throw a `RunRecoveryException`.

  It is often easier to simply exit the application when such errors occur rather than gracefully return up the stack. The panic callback function is a function called when `RunRecoveryException` is about to be thrown from a from a Berkeley DB method.

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

    `e` - The `DatabaseException` that would have been thrown to the calling method.

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

Copyright (c) 1996-2005 Sleepycat Software, Inc. - All rights reserved.