org.htmlparser.util
Class ChainedException
Exception
org.htmlparser.util.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.
throwable
protected Throwable throwable
ChainedException
public ChainedException()
ChainedException
public ChainedException(String message)
ChainedException
public ChainedException(String message,
Throwable throwable)
ChainedException
public ChainedException(Throwable throwable)
getMessageChain
public String[] getMessageChain()
getMessageList
public Vector getMessageList()
getThrowable
public Throwable getThrowable()
printStackTrace
public void printStackTrace()
printStackTrace
public void printStackTrace(PrintStream out)
printStackTrace
public void printStackTrace(PrintWriter out)
| © 2005 Derrick Oswald Mai 08, 2008 |
HTML Parser is an open source library released under LGPL. |  |