Class DiscordException

  • All Implemented Interfaces:
    java.io.Serializable

    public class DiscordException
    extends java.lang.RuntimeException
    Represents an error thown either by the discord api, or by the Rodicon api. Errors thrown by the discord api will have error codes matching the ones listed here. Errors thrown by the Rodicon api will have error codes in the list below:
    0 - Unknown exception. Check logs for more details. 80001 - IOException thrown when submitting an http request.
    80002 - InterruptedException thrown when submitting an http request.
    80003 - Unknown channel type
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DiscordException​(int code, java.lang.String message)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()  
      java.lang.String getMessage()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

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

      • DiscordException

        public DiscordException​(int code,
                                java.lang.String message)
    • Method Detail

      • getCode

        public int getCode()
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable