net.sf.basedb.util.error
Class SimpleErrorHandler
java.lang.Object
net.sf.basedb.util.error.SimpleErrorHandler
- All Implemented Interfaces:
- ErrorHandler
public class SimpleErrorHandler
- extends Object
- implements ErrorHandler
A simple error handler that either ignores all errors or
re-throws them.
- Version:
- 2.0
- Author:
- nicklas
- Last modified
- $Date: 2008-09-11 22:08:14 +0200 (Thu, 11 Sep 2008) $
Constructor Summary |
SimpleErrorHandler(boolean ignoreAllErrors)
Create a new simple error handler. |
Method Summary |
boolean |
handleError(Throwable t)
Return TRUE if all errors should be ignored, otherwise re-throw the
throwable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ignoreAllErrors
private final boolean ignoreAllErrors
SimpleErrorHandler
public SimpleErrorHandler(boolean ignoreAllErrors)
- Create a new simple error handler.
- Parameters:
ignoreAllErrors
- TRUE to ignore all errors, FALSE to re-throw them
handleError
public boolean handleError(Throwable t)
throws Throwable
- Return TRUE if all errors should be ignored, otherwise re-throw the
throwable.
- Specified by:
handleError
in interface ErrorHandler
- 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