com.compoze.collab.util
Class NestedRuntimeException

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

public class NestedRuntimeException
extends RuntimeException
implements Serializable

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

See Also
Serialized Form

Constructor Summary
NestedRuntimeException()
          Constructor.
NestedRuntimeException(String sMessage)
          Constructor.
NestedRuntimeException(Throwable t)
          Constructor.
NestedRuntimeException(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

NestedRuntimeException

public NestedRuntimeException()
Constructor.


NestedRuntimeException

public NestedRuntimeException(String sMessage)
Constructor.

Parameters
sMessage - a detail message for the exception

NestedRuntimeException

public NestedRuntimeException(Throwable t)
Constructor.

Parameters
t - the underlying throwable

NestedRuntimeException

public NestedRuntimeException(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