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

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byorg.eclipse.emf.ecore.resource.Resource.IOWrappedException
All Implemented Interfaces:
Serializable
Enclosing class:
Resource

public static class Resource.IOWrappedException
extends 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  Exception exception
          The wrapped exception.
 
Constructor Summary
Resource.IOWrappedException(Exception exception)
          Creates an instance which wraps the given exception.
 
Method Summary
 String getLocalizedMessage()
          Returns the localized message of the wrapped exception.
 String getMessage()
          Returns the message of the wrapped exception.
 Exception getWrappedException()
          Returns the wrapped exception.
 void printStackTrace()
          Prints the stack trace of the wrapped exception.
 void printStackTrace(PrintStream printStream)
          Prints the stack trace of the wrapped exception.
 void printStackTrace(PrintWriter printWriter)
          Prints the stack trace of the wrapped exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exception

protected Exception exception
The wrapped exception.

Constructor Detail

Resource.IOWrappedException

public Resource.IOWrappedException(Exception exception)
Creates an instance which wraps the given exception.

Parameters:
exception - the exception to wrap.
Method Detail

getWrappedException

public Exception getWrappedException()
Returns the wrapped exception.

Returns:
the wrapped exception.

getLocalizedMessage

public String getLocalizedMessage()
Returns the localized message of the wrapped exception.

Returns:
the localized message of the wrapped exception.

getMessage

public String getMessage()
Returns the message of the wrapped exception.

Returns:
the message of the wrapped exception.

printStackTrace

public void printStackTrace()
Prints the stack trace of the wrapped exception.


printStackTrace

public void printStackTrace(PrintStream printStream)
Prints the stack trace of the wrapped exception.

Parameters:
printStream - the stream to print to.

printStackTrace

public void printStackTrace(PrintWriter printWriter)
Prints the stack trace of the wrapped exception.

Parameters:
printWriter - the writer to print to.

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