Class DiscordException

    • Constructor Detail

      • DiscordException

        public DiscordException​(Exception origin,
                                String message,
                                RestRequestInformation request,
                                RestRequestResponseInformation response)
        Creates a new instance of this class.
        Parameters:
        origin - The origin of the exception.
        message - The message of the exception.
        request - The information about the request.
        response - The information about the response.
    • Method Detail

      • getRequest

        public Optional<RestRequestInformation> getRequest​()
        Gets information about the request which caused the exception. May be null if the exception was thrown before creating a request.
        Returns:
        Information about the request which caused the exception.
      • getResponse

        public Optional<RestRequestResponseInformation> getResponse​()
        Gets information about the response which caused the exception. May not be present if the exception was thrown before sending a request.
        Returns:
        Information about the response which caused the exception.