Package edu.wpi.grip.core.events
Class ExceptionEvent
- java.lang.Object
-
- edu.wpi.grip.core.events.ExceptionEvent
-
public final class ExceptionEvent extends java.lang.Object
Indicates that an Exception has occurred. This class should not be constructed, instead useExceptionWitness
-
-
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()
-
-
-
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. Ifnull
will useThrowable.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 useThrowable.getMessage()
for the message.
-
-