Class GeneralException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.nimbusds.oauth2.sdk.GeneralException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InvalidClientException, ParseException, ResolveException, ResolveException

public class GeneralException extends Exception
The base class for checked exceptions defined in this SDK.
See Also:
  • Constructor Details

    • GeneralException

      public GeneralException(String message)
      Creates a new general exception.
      Parameters:
      message - The exception message. May be null.
    • GeneralException

      public GeneralException(String message, Throwable cause)
      Creates a new general exception.
      Parameters:
      message - The exception message. May be null.
      cause - The exception cause, null if not specified.
    • GeneralException

      Creates a new general exception.
      Parameters:
      error - The associated error. The error description, if specified, is used to set the exception message. Must not be null.
    • GeneralException

      public GeneralException(String message, ErrorObject error)
      Creates a new general exception.
      Parameters:
      message - The exception message. May be null.
      error - The associated error, null if not specified.
    • GeneralException

      public GeneralException(String message, ErrorObject error, Throwable cause)
      Creates a new general exception.
      Parameters:
      message - The exception message. May be null.
      error - The associated error, null if not specified.
      cause - The exception cause, null if not specified.
    • GeneralException

      public GeneralException(String message, ErrorObject error, ClientID clientID, URI redirectURI, ResponseMode responseMode, State state)
      Creates a new general exception.
      Parameters:
      message - The exception message. May be null.
      error - The associated error, null if not specified.
      clientID - The associated client identifier, null if not specified.
      redirectURI - The associated redirection URI, null if not specified.
      responseMode - The optional associated response mode, null if not specified.
      state - The optional associated state parameter, null if not specified.
    • GeneralException

      public GeneralException(String message, ErrorObject error, ClientID clientID, URI redirectURI, ResponseMode responseMode, State state, Throwable cause)
      Creates a new general exception.
      Parameters:
      message - The exception message. May be null.
      error - The associated error, null if not specified.
      clientID - The associated client identifier, null if not specified.
      redirectURI - The associated redirection URI, null if not specified.
      state - The optional associated state parameter, null if not specified.
      responseMode - The optional associated response mode, null if not specified.
      cause - The exception cause, null if not specified.
  • Method Details

    • getErrorObject

      Gets the associated error.
      Returns:
      The error, null if not specified.
    • getClientID

      Gets the associated client identifier.
      Returns:
      The client ID, null if not specified.
    • getRedirectionURI

      Gets the associated redirection URI.
      Returns:
      The redirection URI, null if redirection is not to be performed for this error.
    • getResponseMode

      Gets the associated response mode.
      Returns:
      The response mode, null if not specified.
    • getState

      public State getState()
      Gets the optional associated state parameter.
      Returns:
      The optional state parameter, null if not specified or redirection is not to be performed.