EAF 7.6 API

com.lutris.util
Class ChainedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.lutris.util.ChainedException
All Implemented Interfaces:
ChainedThrowable, java.io.Serializable
Direct Known Subclasses:
ApplicationException, FilePresentationException, HttpPresentationException, PersistentStoreException, SessionException

public class ChainedException
extends java.lang.Exception
implements ChainedThrowable

Exception used as a base for creating an exception that has a chain of exceptions that lead to the derived exception. Very useful for interfaces where the implementation exception is not known.

See Also:
Serialized Form

Constructor Summary
ChainedException(java.lang.String msg)
          Construct an exception without a specified cause.
ChainedException(java.lang.String msg, java.lang.Throwable cause)
          Construct an exception with an associated causing exception.
ChainedException(java.lang.Throwable cause)
          Construct an exception from a causing exception.
 
Method Summary
 java.lang.Throwable getCause()
          Get the causing exception associated with this exception.
 java.lang.String getMessage()
          Return the message associated with this exception.
 void printStackTrace()
          Prints this ChainedException and its backtrace, and the causes and their stack traces to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Prints this ChainedException and its backtrace, and the causes and their stack traces to the e specified print stream.
 void printStackTrace(java.io.PrintWriter s)
          Prints this ChainedException and its backtrace, and the causes and their stack traces to the e specified print writer.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChainedException

public ChainedException(java.lang.String msg)
Construct an exception without a specified cause.

Parameters:
msg - The message associated with the exception.

ChainedException

public ChainedException(java.lang.String msg,
                        java.lang.Throwable cause)
Construct an exception with an associated causing exception.

Parameters:
msg - The message associated with the exception.
cause - The error or exception that cause this exception.

ChainedException

public ChainedException(java.lang.Throwable cause)
Construct an exception from a causing exception.

Parameters:
cause - The error or exception that cause this exception. The message will be take be this object's messasge.
Method Detail

getMessage

public java.lang.String getMessage()
Return the message associated with this exception. If causes are included, they will be appended to the message.

Specified by:
getMessage in interface ChainedThrowable
Overrides:
getMessage in class java.lang.Throwable

getCause

public java.lang.Throwable getCause()
Get the causing exception associated with this exception.

Specified by:
getCause in interface ChainedThrowable
Overrides:
getCause in class java.lang.Throwable
Returns:
The causing exception or null if no cause is specified.

printStackTrace

public void printStackTrace()
Prints this ChainedException and its backtrace, and the causes and their stack traces to the standard error stream.

Specified by:
printStackTrace in interface ChainedThrowable
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints this ChainedException and its backtrace, and the causes and their stack traces to the e specified print stream.

Specified by:
printStackTrace in interface ChainedThrowable
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Prints this ChainedException and its backtrace, and the causes and their stack traces to the e specified print writer.

Specified by:
printStackTrace in interface ChainedThrowable
Overrides:
printStackTrace in class java.lang.Throwable

EAF 7.6 API