com.ideanest.util
Class DualIOException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--java.io.IOException
|
+--com.ideanest.util.DualIOException
- All Implemented Interfaces:
- java.io.Serializable
- public class DualIOException
- extends java.io.IOException
Signals that two I/O exceptions occurred. After the primary exception
occurred, the secondary one was encountered while trying to clean up
resources before propagating the primary one. This can happen when
trying to close a stream after some read/write error occurred, since
the close method can throw an IOException itself.
- Version:
- 1.0, 2002-03-10
- Author:
- Piotr Kaminski (piotr@ideanest.com)
- See Also:
- Serialized Form
Constructor Summary |
DualIOException(java.io.IOException e1,
java.io.IOException e2)
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DualIOException
public DualIOException(java.io.IOException e1,
java.io.IOException e2)
rethrow
public static void rethrow(java.io.IOException e1,
java.io.IOException e2)
throws java.io.IOException
- Propagate any exceptions that may have occurred. If both arguments are
null , do nothing. If only one is non-null ,
rethrow that exception. Otherwise create a new DualIOException
containing the two and throw it.
java.io.IOException
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage in class java.lang.Throwable
getPrimaryException
public java.io.IOException getPrimaryException()
getSecondaryException
public java.io.IOException getSecondaryException()
|