org.eclipse.emf.common.util
Class WrappedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.eclipse.emf.common.util.WrappedException
All Implemented Interfaces:
java.io.Serializable

public class WrappedException
extends java.lang.RuntimeException

A runtime exception that wraps another exception.

See Also:
Serialized Form

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

Field Detail

wrappedException

protected java.lang.Exception wrappedException
The exception being wrapped.
Constructor Detail

WrappedException

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

WrappedException

public WrappedException(java.lang.String message,
                        java.lang.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 java.lang.Exception exception()
Returns the wrapped exception.
Returns:
the wrapped exception.

printStackTrace

public void printStackTrace()
Prints both wrapped exception's stack and this one's.
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream printStream)
Prints both wrapped exception's stack and this one's.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
printWriter - the print target.

printStackTrace

public void printStackTrace(java.io.PrintWriter printWriter)
Prints both wrapped exception's stack and this one's.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
printWriter - the print target.

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