org.enhydra.error
Interface ChainedThrowable

All Known Implementing Classes:
ChainedError, ChainedException, ChainedRuntimeException

public interface ChainedThrowable

Interface base for all of the Chained* classes. The chain throwables provide a linked list of throw objects, providing a complex description of an error, with information from each layer handling the error. This paradigm also allows for conversion from one error type to another without losing information.

Classes are provided that server as a base of implementing chained throwable classes. When it is necessary to extend an existing throwable class that is not chained, say to conform to an interface, and one wants to also also add ChainedThrowable support, this interface is implemented. The static methods in ChainedExceptionSupport are used to implemented the required ChainedThrowable methods in such classes.

See Also:
ChainedError, ChainedException, ChainedRuntimeException, ChainedThrowableSupport

Method Summary
 Throwable getCause()
          Get the causing exception associated with this exception.
 String getLocalizedMessage()
          Creates a localized description of this Throwable.
 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(PrintStream s)
          Prints this ChainedException and its backtrace, and the causes and their stack traces to the e specified print stream.
 void printStackTrace(PrintWriter s)
          Prints this ChainedException and its backtrace, and the causes and their stack traces to the e specified print writer.
 

Method Detail

getMessage

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

getLocalizedMessage

public String getLocalizedMessage()
Creates a localized description of this Throwable.

getCause

public Throwable getCause()
Get the causing exception associated with this exception.
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.

printStackTrace

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

printStackTrace

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


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.