com.compoze.collab.util
Class NestedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.compoze.collab.util.NestedException
All Implemented Interfaces
Serializable
Direct Known Subclasses:
CollaborationException

public class NestedException
extends Exception
implements Serializable

This class is an exception that wraps another exception. Any nested exception traces are included when the stack trace is printed.

See Also
Serialized Form

Constructor Summary
NestedException()
          Constructor.
NestedException(String sMessage)
          Constructor.
NestedException(Throwable t)
          Constructor.
NestedException(Throwable t, String sMessage)
          Constructor.
 
Method Summary
 Throwable getNestedException()
          Get the nested exception.
 String getStackTraceString()
          Gets the stack trace as a String.
 void printStackTrace()
          Print stack trace of this exception and the underlying exception if available.
 void printStackTrace(PrintStream printStream)
          Print stack trace of this exception and the underlying exception if available.
 void printStackTrace(PrintWriter writer)
          Print stack trace of this exception and the underlying exception if available.
 String toString()
          Create a string representation of the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedException

public NestedException()
Constructor.


NestedException

public NestedException(String sMessage)
Constructor.

Parameters
sMessage - a detail message for the exception

NestedException

public NestedException(Throwable t)
Constructor.

Parameters
t - the underlying throwable

NestedException

public NestedException(Throwable t,
                       String sMessage)
Constructor.

Parameters
t - the underlying throwable
sMessage - a detail message for the exception
Method Detail

getNestedException

public Throwable getNestedException()
Get the nested exception.

Returns
the nested exception, or null if there isn't one

printStackTrace

public void printStackTrace()
Print stack trace of this exception and the underlying exception if available.

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter writer)
Print stack trace of this exception and the underlying exception if available.

Overrides:
printStackTrace in class Throwable
Parameters
writer - the writer to print to

printStackTrace

public void printStackTrace(PrintStream printStream)
Print stack trace of this exception and the underlying exception if available.

Overrides:
printStackTrace in class Throwable
Parameters
printStream - the print stream to print to

getStackTraceString

public String getStackTraceString()
Gets the stack trace as a String.

Returns
the stack trace

toString

public String toString()
Create a string representation of the exception.

Overrides:
toString in class Throwable
Returns
the string representation


Copyright © 2006 BEA Systems, Inc. All Rights Reserved