Class 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 Detail

      • ignoreAllErrors

        private final boolean ignoreAllErrors
    • Constructor Detail

      • SimpleErrorHandler

        public SimpleErrorHandler​(boolean ignoreAllErrors)
        Create a new simple error handler.
        Parameters:
        ignoreAllErrors - TRUE to ignore all errors, FALSE to re-throw them
    • Method Detail

      • 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