Class EventHandlingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.aristaflow.adept2.model.events.EventHandlingException
- All Implemented Interfaces:
Serializable
This exception indicates that an event handler had a problem when handling an
event. Usually event handling will continue with other event handler that
have been registered for the same event type and source type.
- Author:
- Ulrich Kreher
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether the exception is critical and therefore event handling should be aborted. -
Constructor Summary
ConstructorsConstructorDescriptionEventHandlingException(String message) Creates a new non-criticalEventHandlingExceptionhaving the designated message.EventHandlingException(String message, boolean critical) Creates a newEventHandlingExceptionhaving the designated message.EventHandlingException(String message, Throwable cause) Creates a new non-criticalEventHandlingExceptionhaving the designated message and the designated cause.EventHandlingException(String message, Throwable cause, boolean critical) Creates a newEventHandlingExceptionhaving the designated message and the designated cause. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets whether the exception is critical and therefore event handling should be aborted.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
critical
protected boolean criticalWhether the exception is critical and therefore event handling should be aborted.
-
-
Constructor Details
-
EventHandlingException
Creates a new non-criticalEventHandlingExceptionhaving the designated message.- Parameters:
message- The message describing the cause of theEventHandlingException.
-
EventHandlingException
Creates a newEventHandlingExceptionhaving the designated message.- Parameters:
message- The message describing the cause of theEventHandlingException.critical- Whether the exception is critical and therefore event handling should be aborted.
Note that this will not abort concurrent event handling unless your hander is exclusive.
-
EventHandlingException
Creates a new non-criticalEventHandlingExceptionhaving the designated message and the designated cause.- Parameters:
message- The message describing the cause of theEventHandlingException.cause- The exception causing theEventHandlingException.
-
EventHandlingException
Creates a newEventHandlingExceptionhaving the designated message and the designated cause.- Parameters:
message- The message describing the cause of theEventHandlingException.cause- The exception causing theEventHandlingException.critical- Whether the exception is critical and therefore event handling should be aborted.
Note that this will not abort concurrent event handling unless your hander is exclusive.
-
-
Method Details
-
isCritical
public boolean isCritical()Gets whether the exception is critical and therefore event handling should be aborted.- Returns:
- Whether the exception is critical and therefore event handling should be aborted.
-