com.nimbusds.oauth2.sdk
Class GeneralException

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

public class GeneralException
extends Exception

The base class for exceptions defined in this SDK.

Author:
Vladimir Dzhuvinov
See Also:
Serialized Form

Constructor Summary
GeneralException(String message)
          Creates a new general exception.
GeneralException(String message, ErrorObject error, Throwable cause)
          Creates a new general exception.
GeneralException(String message, ErrorObject error, URL redirectURI, State state, Throwable cause)
          Creates a new general exception.
GeneralException(String message, Throwable cause)
          Creates a new general exception.
 
Method Summary
 ErrorObject getErrorObject()
          Gets the associated error.
 URL getRedirectURI()
          Gets the associated redirection URI.
 State getState()
          Gets the optional associated state parameter.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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

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

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,
                        URL redirectURI,
                        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.
redirectURI - The associated redirection URI, null if not specified.
state - The optional associated state parameter, null if not specified.
cause - The exception cause, null if not specified.
Method Detail

getErrorObject

public ErrorObject getErrorObject()
Gets the associated error.

Returns:
The error, null if not specified.

getRedirectURI

public URL getRedirectURI()
Gets the associated redirection URI.

Important: Must be verified with the client registry before acting upon it!

Returns:
The redirection URI, null if redirection is not to be performed for this error.

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.


Copyright © 2013 NimbusDS. All Rights Reserved.