public class ExceptionSafeErrorHandler extends Object implements ErrorHandler
Wrapping error handler that ensures that no exceptions are thrown. This
wrapper can be used by code that calls an error handler to ensure that the
handleError(Class, Throwable, String) method does not throw an
exception, if there is an implementation bug in the error handler.
This error handler simply delegates to the error handler specified at construction time and catches any exception the delegate error-handler might throw.
|Constructor and Description|
Creates an error handler that never thrown an exception from the specified error handler.
|Modifier and Type||Method and Description|
Handles an error.
public ExceptionSafeErrorHandler(ErrorHandler delegate)
null, this error handler simply ignores all calls to
handleError(Class, Throwable, String).
delegate- error handler to which calls of
handleError(Class, Throwable, String)should be delegated or
nullif these calls should simply be ignored.
Handles an error. This method is called if the library code detects an
exception that it cannot handle internally or detects another abnormal
situation. At least one of
guaranteed not to be
This method should not throw an exception, but if it does, this exception will simply be ignored.
context- the class that called the error handler. This information can be used to determine in which component an exception occurred if the same exception handler is registered for various components.
e- exception that was encountered by library code and could not be handled internally or
nullif no exception is available.
description- some additional information about the context in which the error occurred or
nullif no such information is available.
Copyright © 2014–2017 aquenos GmbH. All rights reserved.