public class TaggedIOException extends IOExceptionWithCause
IOException
wrapper that tags the wrapped exception with
a given object reference. Both the tag and the wrapped original exception
can be used to determine further processing when this exception is caught.Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
tag
The object reference used to tag the exception.
|
Constructor and Description |
---|
TaggedIOException(java.io.IOException original,
java.lang.Object tag)
Creates a tagged wrapper for the given exception.
|
Modifier and Type | Method and Description |
---|---|
java.io.IOException |
getCause()
Returns the wrapped exception.
|
java.lang.Object |
getTag()
Returns the object reference used as the tag this exception.
|
public TaggedIOException(java.io.IOException original, java.lang.Object tag)
original
- the exception to be taggedtag
- tag objectpublic java.lang.Object getTag()
public java.io.IOException getCause()
Throwable.getCause()
method is the narrower return type.getCause
in class java.lang.Throwable