public class LoggingErrorHandler extends Object implements ListenerInvocationErrorHandler
ListenerInvocationErrorHandler
that logs exceptions as errors but otherwise does nothing to
prevent event handling from continuing.Constructor and Description |
---|
LoggingErrorHandler()
Initialize the LoggingErrorHandler using the logger for "org.axonframework.eventhandling.LoggingErrorHandler".
|
LoggingErrorHandler(org.slf4j.Logger logger)
Initialize the LoggingErrorHandler to use the given
logger to log errors |
Modifier and Type | Method and Description |
---|---|
void |
onError(Exception exception,
EventMessage<?> event,
EventListener eventListener)
Invoked after given
eventListener failed to handle given event . |
public LoggingErrorHandler()
public LoggingErrorHandler(org.slf4j.Logger logger)
logger
to log errorslogger
- the logger to log errors withpublic void onError(Exception exception, EventMessage<?> event, EventListener eventListener)
ListenerInvocationErrorHandler
eventListener
failed to handle given event
. Implementations have a
choice of options for how to continue:
EventListener.handle(EventMessage)
on the eventListener once or multiple times.onError
in interface ListenerInvocationErrorHandler
exception
- The exception thrown by the given eventListenerevent
- The event that triggered the exceptioneventListener
- The listener that failed to handle given eventCopyright © 2010–2017. All rights reserved.