org.tentackle.db
Interface ErrorHandler

All Known Implementing Classes:
DefaultErrorHandler

public interface ErrorHandler

Interface for an error handler, i.e. some db-error that will cause the application to stop and/or log info. The handler provides the opportunity to stop it gracefully for severe errors that cannot be handled by the application (e.g. missing column).

Author:
harald

Method Summary
 void info(Db db, Exception e, String msg)
          Handles information logging (no warning, no error, no stop).
 void info(Exception e, String msg)
          Handles information logging (no warning, no error, no stop).
 void severe(Db db, Exception e, String msg)
          Handles a fatal error.
Will terminate the application usually by throwing a RuntimeException.
 void severe(Exception e, String msg)
          Handles a fatal error.
Will terminate the application usually by throwing a RuntimeException.
 void warning(Db db, Exception e, String msg)
          Handles a non-fatal error.
Will not terminate the application but log the error.
 void warning(Exception e, String msg)
          Handles a non-fatal error.
Will not terminate the application but log the error.
 

Method Detail

severe

void severe(Db db,
            Exception e,
            String msg)
Handles a fatal error.
Will terminate the application usually by throwing a RuntimeException.

Parameters:
db - is the db that caused the error (may be null)
e - is the exception (may be null)
msg - is an error message (may be null)

severe

void severe(Exception e,
            String msg)
Handles a fatal error.
Will terminate the application usually by throwing a RuntimeException.

Parameters:
e - is the exception (may be null)
msg - is an error message (may be null)

warning

void warning(Db db,
             Exception e,
             String msg)
Handles a non-fatal error.
Will not terminate the application but log the error.

Parameters:
db - is the db that caused the error (may be null)
e - is the exception (may be null)
msg - is an error message (may be null)

warning

void warning(Exception e,
             String msg)
Handles a non-fatal error.
Will not terminate the application but log the error.

Parameters:
e - is the exception (may be null)
msg - is an error message (may be null)

info

void info(Db db,
          Exception e,
          String msg)
Handles information logging (no warning, no error, no stop).

Parameters:
db - is the db that caused the error (may be null)
e - is the exception (may be null)
msg - is an error message (may be null)

info

void info(Exception e,
          String msg)
Handles information logging (no warning, no error, no stop).

Parameters:
e - is the exception (may be null)
msg - is an error message (may be null)


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de