Class EventHandlingException

  • All Implemented Interfaces:
    Serializable

    public class EventHandlingException
    extends Exception
    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:
    Serialized Form
    • Field Detail

      • critical

        protected boolean critical
        Whether the exception is critical and therefore event handling should be aborted.
    • Constructor Detail

      • EventHandlingException

        public EventHandlingException​(String message)
        Creates a new non-critical EventHandlingException having the designated message.
        Parameters:
        message - The message describing the cause of the EventHandlingException.
      • EventHandlingException

        public EventHandlingException​(String message,
                                      boolean critical)
        Creates a new EventHandlingException having the designated message.
        Parameters:
        message - The message describing the cause of the EventHandlingException.
        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

        public EventHandlingException​(String message,
                                      Throwable cause)
        Creates a new non-critical EventHandlingException having the designated message and the designated cause.
        Parameters:
        message - The message describing the cause of the EventHandlingException.
        cause - The exception causing the EventHandlingException.
      • EventHandlingException

        public EventHandlingException​(String message,
                                      Throwable cause,
                                      boolean critical)
        Creates a new EventHandlingException having the designated message and the designated cause.
        Parameters:
        message - The message describing the cause of the EventHandlingException.
        cause - The exception causing the EventHandlingException.
        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 Detail

      • 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.