public class CountedErrorHandler extends Object implements ErrorHandler
ErrorHandler
which calls AtomicCounter.increment()
before delegating the exception.Constructor and Description |
---|
CountedErrorHandler(ErrorHandler errorHandler,
AtomicCounter errorCounter)
Construct a counted error handler with a delegate and counter.
|
Modifier and Type | Method and Description |
---|---|
void |
onError(Throwable throwable)
Callback to notify of an error that has occurred when processing an operation or event.
|
public CountedErrorHandler(ErrorHandler errorHandler, AtomicCounter errorCounter)
errorHandler
- to delegate to.errorCounter
- to increment before delegation.public void onError(Throwable throwable)
ErrorHandler
This method is assumed non-throwing, so rethrowing the exception or triggering further exceptions would be a bug.
onError
in interface ErrorHandler
throwable
- that occurred while processing an operation or event.Copyright © 2014-2019 Real Logic Ltd. All Rights Reserved.