org.tentackle.db
Class DefaultErrorHandler

java.lang.Object
  extended by org.tentackle.db.DefaultErrorHandler
All Implemented Interfaces:
ErrorHandler

public class DefaultErrorHandler
extends Object
implements ErrorHandler

The default database error handler.

Author:
harald

Constructor Summary
DefaultErrorHandler()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultErrorHandler

public DefaultErrorHandler()
Method Detail

severe

public void severe(Db db,
                   Exception e,
                   String msg)
Description copied from interface: ErrorHandler
Handles a fatal error.
Will terminate the application usually by throwing a RuntimeException.

Specified by:
severe in interface ErrorHandler
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

public void severe(Exception e,
                   String msg)
Description copied from interface: ErrorHandler
Handles a fatal error.
Will terminate the application usually by throwing a RuntimeException.

Specified by:
severe in interface ErrorHandler
Parameters:
e - is the exception (may be null)
msg - is an error message (may be null)

warning

public void warning(Db db,
                    Exception e,
                    String msg)
Description copied from interface: ErrorHandler
Handles a non-fatal error.
Will not terminate the application but log the error.

Specified by:
warning in interface ErrorHandler
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

public void warning(Exception e,
                    String msg)
Description copied from interface: ErrorHandler
Handles a non-fatal error.
Will not terminate the application but log the error.

Specified by:
warning in interface ErrorHandler
Parameters:
e - is the exception (may be null)
msg - is an error message (may be null)

info

public void info(Db db,
                 Exception e,
                 String msg)
Description copied from interface: ErrorHandler
Handles information logging (no warning, no error, no stop).

Specified by:
info in interface ErrorHandler
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

public void info(Exception e,
                 String msg)
Description copied from interface: ErrorHandler
Handles information logging (no warning, no error, no stop).

Specified by:
info in interface ErrorHandler
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