Package com.nimbusds.oauth2.sdk
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
public class GeneralException extends Exception
The base class for checked exceptions defined in this SDK.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GeneralException(ErrorObject error)Creates a new general exception.GeneralException(String message)Creates a new general exception.GeneralException(String message, ErrorObject error)Creates a new general exception.GeneralException(String message, ErrorObject error, ClientID clientID, URI redirectURI, ResponseMode responseMode, State state)Creates a new general exception.GeneralException(String message, ErrorObject error, ClientID clientID, URI redirectURI, ResponseMode responseMode, State state, Throwable cause)Creates a new general exception.GeneralException(String message, ErrorObject error, Throwable cause)Creates a new general exception.GeneralException(String message, Throwable cause)Creates a new general exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientIDgetClientID()Gets the associated client identifier.ErrorObjectgetErrorObject()Gets the associated error.URIgetRedirectionURI()Gets the associated redirection URI.ResponseModegetResponseMode()Gets the associated response mode.StategetState()Gets the optional associated state parameter.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
GeneralException
public GeneralException(String message)
Creates a new general exception.- Parameters:
message- The exception message. May benull.
-
GeneralException
public GeneralException(String message, Throwable cause)
Creates a new general exception.- Parameters:
message- The exception message. May benull.cause- The exception cause,nullif not specified.
-
GeneralException
public GeneralException(ErrorObject error)
Creates a new general exception.- Parameters:
error- The associated error. The error description, if specified, is used to set the exception message. Must not benull.
-
GeneralException
public GeneralException(String message, ErrorObject error)
Creates a new general exception.- Parameters:
message- The exception message. May benull.error- The associated error,nullif not specified.
-
GeneralException
public GeneralException(String message, ErrorObject error, Throwable cause)
Creates a new general exception.- Parameters:
message- The exception message. May benull.error- The associated error,nullif not specified.cause- The exception cause,nullif 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 benull.error- The associated error,nullif not specified.clientID- The associated client identifier,nullif not specified.redirectURI- The associated redirection URI,nullif not specified.responseMode- The optional associated response mode,nullif not specified.state- The optional associated state parameter,nullif 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 benull.error- The associated error,nullif not specified.clientID- The associated client identifier,nullif not specified.redirectURI- The associated redirection URI,nullif not specified.state- The optional associated state parameter,nullif not specified.responseMode- The optional associated response mode,nullif not specified.cause- The exception cause,nullif not specified.
-
-
Method Detail
-
getErrorObject
public ErrorObject getErrorObject()
Gets the associated error.- Returns:
- The error,
nullif not specified.
-
getClientID
public ClientID getClientID()
Gets the associated client identifier.- Returns:
- The client ID,
nullif not specified.
-
getRedirectionURI
public URI getRedirectionURI()
Gets the associated redirection URI.- Returns:
- The redirection URI,
nullif redirection is not to be performed for this error.
-
getResponseMode
public ResponseMode getResponseMode()
Gets the associated response mode.- Returns:
- The response mode,
nullif not specified.
-
-