org.eclipse.emf.common.util
Class WrappedException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.eclipse.emf.common.util.WrappedException
All Implemented Interfaces:
Serializable

public class WrappedException
extends RuntimeException

A runtime exception that wraps another exception.

See Also:
Serialized Form

Field Summary
protected  Exception wrappedException
          The exception being wrapped.
 
Constructor Summary
WrappedException(Exception exception)
          Creates an instance that wraps the exception.
WrappedException(String message, Exception exception)
          Creates an instance with it's own message that wraps the exception.
 
Method Summary
 Exception exception()
          Returns the wrapped exception.
 void printStackTrace()
          Prints both wrapped exception's stack and this one's.
 void printStackTrace(PrintStream printStream)
          Prints both wrapped exception's stack and this one's.
 void printStackTrace(PrintWriter printWriter)
          Prints both wrapped exception's stack and this one's.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wrappedException

protected Exception wrappedException
The exception being wrapped.

Constructor Detail

WrappedException

public WrappedException(Exception exception)
Creates an instance that wraps the exception.


WrappedException

public WrappedException(String message,
                        Exception exception)
Creates an instance with it's own message that wraps the exception.

Parameters:
message - the message.
exception - the exception to wrap.
Method Detail

exception

public Exception exception()
Returns the wrapped exception.

Returns:
the wrapped exception.

printStackTrace

public void printStackTrace()
Prints both wrapped exception's stack and this one's.


printStackTrace

public void printStackTrace(PrintStream printStream)
Prints both wrapped exception's stack and this one's.

Parameters:
printStream - the print target.

printStackTrace

public void printStackTrace(PrintWriter printWriter)
Prints both wrapped exception's stack and this one's.

Parameters:
printWriter - the print target.

Copyright 2001-2004 IBM Corporation and others.
All Rights Reserved.