Package org.apache.tika.io
Class TaggedIOException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.apache.tika.io.IOExceptionWithCause
-
- org.apache.tika.io.TaggedIOException
-
- All Implemented Interfaces:
Serializable
public class TaggedIOException extends IOExceptionWithCause
AnIOException
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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TaggedIOException(IOException original, Object tag)
Creates a tagged wrapper for the given exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IOException
getCause()
Returns the wrapped exception.Object
getTag()
Returns the object reference used as the tag this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
TaggedIOException
public TaggedIOException(IOException original, Object tag)
Creates a tagged wrapper for the given exception.- Parameters:
original
- the exception to be taggedtag
- tag object
-
-
Method Detail
-
getTag
public Object getTag()
Returns the object reference used as the tag this exception.- Returns:
- tag object
-
getCause
public IOException getCause()
Returns the wrapped exception. The only difference to the overriddenThrowable.getCause()
method is the narrower return type.
-
-