org.openemcee.commons.exceptions
Class ChainedException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.openemcee.commons.exceptions.ChainedException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttributePermissionDescriptorImpl.ValidatorInstanciationException, MicroflowExecutor.ExecutorError, MicroflowFactory.MicroflowNotFoundException, MicroflowRunner.MicroflowException

public class ChainedException
extends java.lang.Exception

This class implements an exception which can be chained to other exceptions, in the style of the SQLException. It is very handy for use in layered applications.

Author:
Scott Schenkein
See Also:
Serialized Form

Constructor Summary
ChainedException(java.lang.String message, java.lang.Throwable chained)
          Creates a new instance of ChainedException
 
Method Summary
 java.lang.Throwable getChained()
          Access the exception which caused this to be thrown.
 java.lang.String getMessage()
          Get the message associated with this exception.
 void printStackTrace()
          Print a stack trace to standard error, recursing any chained exceptions.
 void printStackTrace(java.io.PrintStream s)
          Print a stack trace to a PrintStream, recursing any chained exceptions.
 void printStackTrace(java.io.PrintWriter w)
          Print a stack trace to a PrintWriter, recursing any chained exceptions.
 java.lang.String toString()
          Get a resursive string representation of this exception (and all that are chained).
protected  java.lang.String toString(java.lang.StringBuffer buf)
          Append a recursive string representation to the StringBuffer.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
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 message,
                        java.lang.Throwable chained)
Creates a new instance of ChainedException

Parameters:
message - The message associated with this exception.
chained - The chained exception, or root cause of the problem.
Method Detail

getChained

public java.lang.Throwable getChained()
Access the exception which caused this to be thrown.

Returns:
The exception which caused this to be thrown.

getMessage

public java.lang.String getMessage()
Get the message associated with this exception.

Returns:
The message associated with this message.

printStackTrace

public void printStackTrace()
Print a stack trace to standard error, recursing any chained exceptions.


printStackTrace

public void printStackTrace(java.io.PrintStream s)
Print a stack trace to a PrintStream, recursing any chained exceptions.

Parameters:
s - The print stream to which we print this stack trace.

printStackTrace

public void printStackTrace(java.io.PrintWriter w)
Print a stack trace to a PrintWriter, recursing any chained exceptions.

Parameters:
w - The print writer to which we print this stack trace.

toString

protected java.lang.String toString(java.lang.StringBuffer buf)
Append a recursive string representation to the StringBuffer.

Parameters:
buf - The buffer print to which we print the string rep of the object.
Returns:
The string representation which was printed to the buffer.

toString

public java.lang.String toString()
Get a resursive string representation of this exception (and all that are chained).

Returns:
The recursive string representation of this object.


OpenEmcee Microflow Engine for Java: All software and content contained herein is subject to the Mozilla public license v1.1.
SourceForge.net Logo