2.17.2: 2011-06-17

net.sf.basedb.util.error
Interface ErrorHandler

All Known Implementing Classes:
ClassMapErrorHandler, SimpleErrorHandler

public interface ErrorHandler

An interface to make it easier to implement dynamic error handling. A typical implementation allows the registration of one or more error handlers. When an exception is thrown the handleError(Throwable) method is invoked on the first error handler. There are three outcomes:

Version:
2.0
Author:
nicklas
Last modified
$Date: 2008-09-11 22:08:14 +0200 (Thu, 11 Sep 2008) $

Method Summary
 boolean handleError(Throwable t)
          Handle an error.
 

Method Detail

handleError

boolean handleError(Throwable t)
                    throws Throwable
Handle an error. If it is decided that the error is a final error this method should rethrow the same or a different exception. If if is decided that it is possible to continue with the current operation true should be returned. If false is returned it indicates that this error handled doesn't know how to handle the error. The caller should try another error handler or throw an exception.

Parameters:
t - The error to handle
Returns:
TRUE if the error was handled successfully and the execution should continue with the next item
Throws:
Throwable - If the error is final and can't be solved

2.17.2: 2011-06-17