org.eclipse.emf.ecore.resource
Class Resource.IOWrappedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--org.eclipse.emf.ecore.resource.Resource.IOWrappedException
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Resource

public static class Resource.IOWrappedException
extends java.io.IOException

An IO exception that wraps another exception.

Since save and load throw an IO Exception, it may be convenient for an implementation to wrap another exception in order to throw it as an IO exception.

See Also:
Serialized Form

Field Summary
protected  java.lang.Exception exception
          The wrapped exception.
 
Constructor Summary
Resource.IOWrappedException(java.lang.Exception exception)
          Creates an instance which wraps the given exception.
 
Method Summary
 java.lang.String getLocalizedMessage()
          Returns the localized message of the wrapped exception.
 java.lang.String getMessage()
          Returns the message of the wrapped exception.
 java.lang.Exception getWrappedException()
          Returns the wrapped exception.
 void printStackTrace()
          Prints the stack trace of the wrapped exception.
 void printStackTrace(java.io.PrintStream printStream)
          Prints the stack trace of the wrapped exception.
 void printStackTrace(java.io.PrintWriter printWriter)
          Prints the stack trace of the wrapped exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exception

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

Resource.IOWrappedException

public Resource.IOWrappedException(java.lang.Exception exception)
Creates an instance which wraps the given exception.
Parameters:
exception - the exception to wrap.
Method Detail

getWrappedException

public java.lang.Exception getWrappedException()
Returns the wrapped exception.
Returns:
the wrapped exception.

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Returns the localized message of the wrapped exception.
Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
the localized message of the wrapped exception.

getMessage

public java.lang.String getMessage()
Returns the message of the wrapped exception.
Overrides:
getMessage in class java.lang.Throwable
Returns:
the message of the wrapped exception.

printStackTrace

public void printStackTrace()
Prints the stack trace of the wrapped exception.
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream printStream)
Prints the stack trace of the wrapped exception.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
printStream - the stream to print to.

printStackTrace

public void printStackTrace(java.io.PrintWriter printWriter)
Prints the stack trace of the wrapped exception.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
printWriter - the writer to print to.

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