Package org.axonframework.eventhandling
Class ErrorContext
java.lang.Object
org.axonframework.eventhandling.ErrorContext
Describes the context of an error.
- Since:
- 3.0
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionErrorContext(String eventProcessor, Throwable error, List<? extends EventMessage<?>> failedEvents) Instantiate an ErrorContext for the giveneventProcessor, due to the givenerror, with the givenfailedEvents. -
Method Summary
Modifier and TypeMethodDescriptionerror()Returns the error that was raised in the processorReturns the name of the Event Processor where the error occurred.List<? extends EventMessage<?>> The events part of the batch that failed.
-
Constructor Details
-
ErrorContext
public ErrorContext(@Nonnull String eventProcessor, @Nonnull Throwable error, @Nonnull List<? extends EventMessage<?>> failedEvents) Instantiate an ErrorContext for the giveneventProcessor, due to the givenerror, with the givenfailedEvents.- Parameters:
eventProcessor- the name of the event processor that failed to process the given eventserror- the error that was raised during processingfailedEvents- the list of events that triggered the error
-
-
Method Details
-
eventProcessor
Returns the name of the Event Processor where the error occurred.- Returns:
- the name of the Event Processor where the error occurred
-
error
Returns the error that was raised in the processor- Returns:
- the error that was raised in the processor
-
failedEvents
The events part of the batch that failed. May be empty if an error occurred outside of the scope of processing a batch (e.g. while preparing the next batch).- Returns:
- events part of the batch that failed, if any
-