com.sas.hls.common.exception
Class AbstractCheckedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.sas.hls.common.exception.AbstractCheckedException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AnalysisExistsException, AnalysisNotFoundException, AnalysisRenameException, AuthenticationException, GroupException, JobExecutionException, JobExistsException, JobFormatException, JobNotFoundException, JobSubmissionNotFoundException, JobVersionNotFoundException, MembershipException, OrganizationNotFoundException, PrivilegeException, ProjectExistsException, ProjectNotFoundException, ProjectRenameException, RepositoryJobCreateException, ResourceException, RoleException, TypeNotFoundException, UserException

public abstract class AbstractCheckedException
extends Exception

Parent class of all checked exceptions created in the java API.

See Also:
Serialized Form

Constructor Summary
AbstractCheckedException(String message)
          Construct an AbstractCheckedException with the specified detail message.
AbstractCheckedException(String message, String localizedMessage)
          Construct an AbstractCheckedException with the specified detail and localized message.
AbstractCheckedException(String message, String localizedMessage, Throwable cause)
          Construct an AbstractCheckedException with the specified detail message, localized message and nested exception.
AbstractCheckedException(String message, Throwable cause)
          Construct an AbstractCheckedException with the specified detail message and nested exception.
 
Method Summary
 boolean contains(Class<?> exType)
          Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type.
 String getLocalizedMessage()
           
 String getMessage()
          Return the detail message, including the message from the nested exception if there is one.
 Throwable getMostSpecificCause()
          Retrieve the most specific cause of this exception, that is, either the innermost cause (root cause) or this exception itself.
 Throwable getRootCause()
          Retrieve the innermost cause of this exception, if any.
 void setLocalizedMessage(String localizedMessage)
          Set localized message value for this exception
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, 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

AbstractCheckedException

public AbstractCheckedException(String message)
Construct an AbstractCheckedException with the specified detail message.

Parameters:
message - the detail message

AbstractCheckedException

public AbstractCheckedException(String message,
                                String localizedMessage)
Construct an AbstractCheckedException with the specified detail and localized message.

Parameters:
message - the detail message
localizedMessage - the localized message

AbstractCheckedException

public AbstractCheckedException(String message,
                                Throwable cause)
Construct an AbstractCheckedException with the specified detail message and nested exception.

Parameters:
message - the detail message
cause - the nested exception

AbstractCheckedException

public AbstractCheckedException(String message,
                                String localizedMessage,
                                Throwable cause)
Construct an AbstractCheckedException with the specified detail message, localized message and nested exception.

Parameters:
message - the detail message
localizedMessage - the localized message
cause - the nested exception
Method Detail

getLocalizedMessage

public String getLocalizedMessage()
Overrides:
getLocalizedMessage in class Throwable

setLocalizedMessage

public void setLocalizedMessage(String localizedMessage)
Set localized message value for this exception

Parameters:
localizedMessage -

getMessage

public String getMessage()
Return the detail message, including the message from the nested exception if there is one.

Overrides:
getMessage in class Throwable

getRootCause

public Throwable getRootCause()
Retrieve the innermost cause of this exception, if any.

Returns:
the innermost exception, or null if none

getMostSpecificCause

public Throwable getMostSpecificCause()
Retrieve the most specific cause of this exception, that is, either the innermost cause (root cause) or this exception itself.

Differs from getRootCause() in that it falls back to the present exception if there is no root cause.

Returns:
the most specific cause (never null)

contains

public boolean contains(Class<?> exType)
Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type.

Parameters:
exType - the exception type to look for
Returns:
whether there is a nested exception of the specified type


Copyright (c) 2012, SAS Institute Inc., Cary, NC, USA