Package org.apache.tika.sax
Class TaggedSAXException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.xml.sax.SAXException
org.apache.tika.sax.TaggedSAXException
- All Implemented Interfaces:
Serializable
A
SAXException
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:
-
Constructor Summary
ConstructorDescriptionTaggedSAXException
(SAXException original, Object tag) Creates a tagged wrapper for the given exception. -
Method Summary
Methods inherited from class org.xml.sax.SAXException
getException, getMessage, toString
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
TaggedSAXException
Creates a tagged wrapper for the given exception.- Parameters:
original
- the exception to be taggedtag
- tag object
-
-
Method Details
-
getTag
Returns the object reference used as the tag this exception.- Returns:
- tag object
-
getCause
Returns the wrapped exception. The only difference to the overriddenThrowable.getCause()
method is the narrower return type.- Overrides:
getCause
in classSAXException
- Returns:
- wrapped exception
-