Class ExceptionEvent

  • All Implemented Interfaces:
    GenericEvent

    public class ExceptionEvent
    extends Event
    Indicates that JDA encountered a Throwable that could not be forwarded to another end-user frontend.
    For instance this is fired for events in internal WebSocket handling or audio threads. This includes Errors and WebSocketExceptions

    It is not recommended to simply use this and print each event as some throwables were already logged by JDA. See isLogged().

    • Constructor Summary

      Constructors 
      Constructor Description
      ExceptionEvent​(JDA api, java.lang.Throwable throwable, boolean logged)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable getCause()
      The cause Throwable for this event
      boolean isLogged()
      Whether this Throwable was already printed using the JDA logging system
      • Methods inherited from class java.lang.Object

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

      • ExceptionEvent

        public ExceptionEvent​(@Nonnull
                              JDA api,
                              @Nonnull
                              java.lang.Throwable throwable,
                              boolean logged)
    • Method Detail

      • isLogged

        public boolean isLogged()
        Whether this Throwable was already printed using the JDA logging system
        Returns:
        True, if this throwable was already logged
      • getCause

        @Nonnull
        public java.lang.Throwable getCause()
        The cause Throwable for this event
        Returns:
        The cause