org.jasig.cas.authentication.handler
Class AuthenticationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.jasig.cas.authentication.handler.AuthenticationException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadCredentialsAuthenticationException, BlockedCredentialsAuthenticationException, UncategorizedAuthenticationException, UnsupportedCredentialsException

public abstract class AuthenticationException
extends Exception

The most generic type of authentication exception that one can catch if not sure what specific implementation will be thrown. Top of the tree of all other AuthenticationExceptions.

Since:
3.0
Version:
$Revision$ $Date$
Author:
Scott Battaglia
See Also:
Serialized Form

Constructor Summary
AuthenticationException(String code)
          Constructor that takes a code description of the error.
AuthenticationException(String code, String msg)
          Constructor that takes a code description of the error along with the exception msg generally for logging purposes.
AuthenticationException(String code, String msg, String type)
          Constructor that takes a code description of the error along with the exception msg generally for logging purposes and the type of the error that originally caused the exception.
AuthenticationException(String code, Throwable throwable)
          Constructor that takes a code description of the error and the chained exception.
 
Method Summary
 String getCode()
          Method to return the unique identifier for this error type.
 String getType()
          Method to return the error type of this exception
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthenticationException

public AuthenticationException(String code)
Constructor that takes a code description of the error. These codes normally have a corresponding entries in the messages file for the internationalization of error messages.

Parameters:
code - The short unique identifier for this error.

AuthenticationException

public AuthenticationException(String code,
                               String msg)
Constructor that takes a code description of the error along with the exception msg generally for logging purposes. These codes normally have a corresponding entries in the messages file for the internationalization of error messages.

Parameters:
code - The short unique identifier for this error.
msg - The error message associated with this exception for additional logging purposes.

AuthenticationException

public AuthenticationException(String code,
                               String msg,
                               String type)
Constructor that takes a code description of the error along with the exception msg generally for logging purposes and the type of the error that originally caused the exception. These codes normally have a corresponding entries in the messages file for the internationalization of error messages.

Parameters:
code - The short unique identifier for this error.
msg - The error message associated with this exception for additional logging purposes.
type - The type of the error message that caused the exception to be thrown. By default, all errors are considered of error.

AuthenticationException

public AuthenticationException(String code,
                               Throwable throwable)
Constructor that takes a code description of the error and the chained exception. These codes normally have a corresponding entries in the messages file for the internationalization of error messages.

Parameters:
code - The short unique identifier for this error.
throwable - The chained exception for this AuthenticationException
Method Detail

getType

public final String getType()
Method to return the error type of this exception

Returns:
the String identifier for the cause of this error.

getCode

public final String getCode()
Method to return the unique identifier for this error type.

Returns:
the String identifier for this error type.

toString

public final String toString()
Overrides:
toString in class Throwable


Copyright © 2004-2013 Jasig. All Rights Reserved.