org.iges.util
Class ChainedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.iges.util.ChainedException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AnagramException

public class ChainedException
extends java.lang.Exception

An exception class supporting chaining. Taken from the article Exceptional practices, Part 2 by Brian Goetz, JavaWorld Oct 2001

See Also:
Serialized Form

Constructor Summary
ChainedException()
           
ChainedException(java.lang.String message)
           
ChainedException(java.lang.String message, java.lang.Throwable cause)
           
 
Method Summary
 java.lang.Throwable getCause()
           
 java.lang.String getMessage()
           
 void printStackTrace()
          Prints the stack trace for the entire chain of exceptions
 void printStackTrace(java.io.PrintStream ps)
          Prints the stack trace for the entire chain of exceptions
 void printStackTrace(java.io.PrintWriter pw)
          Prints the stack trace for the entire chain of exceptions
 
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()

ChainedException

public ChainedException(java.lang.String message)

ChainedException

public ChainedException(java.lang.String message,
                        java.lang.Throwable cause)
Method Detail

getCause

public java.lang.Throwable getCause()
Overrides:
getCause in class java.lang.Throwable
Returns:
The exception that caused this exception, or null if there is none.

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Prints the stack trace for the entire chain of exceptions

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Prints the stack trace for the entire chain of exceptions

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Prints the stack trace for the entire chain of exceptions

Overrides:
printStackTrace in class java.lang.Throwable