Class ExceptionEvent


  • public final class ExceptionEvent
    extends java.lang.Object
    Indicates that an Exception has occurred. This class should not be constructed, instead use ExceptionWitness
    • Constructor Summary

      Constructors 
      Constructor Description
      ExceptionEvent​(java.lang.Object origin, java.lang.Exception exception)  
      ExceptionEvent​(java.lang.Object origin, java.lang.Exception exception, java.lang.String message)  
      ExceptionEvent​(java.lang.Object origin, java.lang.String message)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.Exception> getException()  
      java.lang.String getMessage()  
      java.lang.Object getOrigin()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExceptionEvent

        public ExceptionEvent​(java.lang.Object origin,
                              java.lang.Exception exception,
                              @Nullable
                              java.lang.String message)
        Parameters:
        origin - The object that triggered this exception.
        exception - The exception this is handling.
        message - The message associated with this event. If null will use Throwable.getMessage()
      • ExceptionEvent

        public ExceptionEvent​(java.lang.Object origin,
                              java.lang.String message)
        Parameters:
        origin - The object that triggered this exception.
        message - The message associated with this event.
      • ExceptionEvent

        public ExceptionEvent​(java.lang.Object origin,
                              java.lang.Exception exception)
        Parameters:
        origin - The object that triggered this exception.
        exception - The exception this is handling. This will use Throwable.getMessage() for the message.
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
      • getOrigin

        public java.lang.Object getOrigin()
      • getException

        public java.util.Optional<java.lang.Exception> getException()