Package 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: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Field Summary
Fields Modifier and Type Field Description private boolean
ignoreAllErrors
-
Constructor Summary
Constructors Constructor Description SimpleErrorHandler(boolean ignoreAllErrors)
Create a new simple error handler. -
Method Summary
Modifier and Type Method Description boolean
handleError(Throwable t)
Return TRUE if all errors should be ignored, otherwise re-throw the throwable.
-
Field Details
-
ignoreAllErrors
private final boolean ignoreAllErrors
-
-
Constructor Details
-
SimpleErrorHandler
public SimpleErrorHandler(boolean ignoreAllErrors)Create a new simple error handler.- Parameters:
ignoreAllErrors
- TRUE to ignore all errors, FALSE to re-throw them
-
-
Method Details
-
handleError
Return TRUE if all errors should be ignored, otherwise re-throw the throwable.- Specified by:
handleError
in interfaceErrorHandler
- 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
-