org.htmlparser.util
Class ChainedException
public
class
ChainedException
extends Exception
Support for chained exceptions in code that predates Java 1.4.
A chained exception can use a Throwable argument to reference
a lower level exception. The chained exception provides a
stack trace that includes the message and any throwable
exception included as an argument in the chain.
For example:
ApplicationException: Application problem encountered;
ProcessException: Unable to process document;
java.io.IOException: Unable to open 'filename.ext'
at ChainedExceptionTest.openFile(ChainedExceptionTest.java:19)
at ChainedExceptionTest.processFile(ChainedExceptionTest.java:27)
at ChainedExceptionTest.application(ChainedExceptionTest.java:40)
at ChainedExceptionTest.main(ChainedExceptionTest.java:52)
Represents the output from two nested exceptions. The outside
exception is a subclass of ChainedException called
ApplicationException, which includes a throwable reference.
The throwable reference is also a subclass of ChainedException,
called ProcessException, which in turn includes a reference to
a standard IOException. In each case, the message is increasingly
specific about the nature of the problem. The end user may only
see the application exception, but debugging is greatly
enhanced by having more details in the stack trace.
Author: Claude Duguay
protected Throwable throwable
public ChainedException()
public ChainedException(String message)
public ChainedException(Throwable throwable)
public ChainedException(String message, Throwable throwable)
public String[] getMessageChain()
public Vector getMessageList()
public Throwable getThrowable()
public void printStackTrace()
public void printStackTrace(PrintStream out)
public void printStackTrace(PrintWriter out)
HTML Parser is an open source library released under LGPL. |  |