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.Constructor and Description |
---|
TaggedIOException(IOException original,
Object tag)
Creates a tagged wrapper for the given exception.
|
Modifier and Type | Method and Description |
---|---|
IOException |
getCause()
Returns the wrapped exception.
|
Object |
getTag()
Returns the object reference used as the tag this exception.
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public TaggedIOException(IOException original, Object tag)
original
- the exception to be taggedtag
- tag objectpublic Object getTag()
public IOException getCause()
Throwable.getCause()
method is the narrower return type.Copyright © 2007–1969 The Apache Software Foundation. All rights reserved.