Class XIncludeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadEncodingAttributeException,BadHrefAttributeException,BadHTTPHeaderException,BadParseAttributeException,InclusionLoopException,MisplacedFallbackException,NoIncludeLocationException
The generic superclass for all checked exceptions that may be thrown as a result of a violation of XInclude's rules.
- Version:
- 1.1b3
- Author:
- Elliotte Rusty Harold
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXIncludeException(String message) Constructs anXIncludeExceptionwith the specified detail message.XIncludeException(String message, String uri) Creates a newXIncludeExceptionwith a detail message, line and column numbers, and the URI of the document that caused the exception.XIncludeException(String message, Throwable cause) Constructs anXIncludeExceptionwith the specified detail message and initial cause. -
Method Summary
Modifier and TypeMethodDescriptiongetCause()When anIOException,MalformedURLException, or other generic exception is thrown while processing an XML document for XIncludes, it is customarily replaced by some form ofXIncludeException.getURI()Returns the URI of the document that caused this exception.When anIOException,MalformedURLException, or other generic exception is thrown while processing an XML document for XIncludes, it is customarily replaced by some form ofXIncludeException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
XIncludeException
Constructs an
XIncludeExceptionwith the specified detail message.- Parameters:
message- a string indicating the specific problem
-
XIncludeException
Constructs an
XIncludeExceptionwith the specified detail message and initial cause. The error message stringmessagecan later be retrieved by themethod of classThrowable.getMessage()java.lang.Throwable.- Parameters:
message- a string indicating the specific problemcause- the initial cause of the exception
-
XIncludeException
Creates a new
XIncludeExceptionwith a detail message, line and column numbers, and the URI of the document that caused the exception.- Parameters:
message- a string indicating the specific problemuri- the URI of the document that caused this exception
-
-
Method Details
-
getURI
Returns the URI of the document that caused this exception. If the URI is not known, null is returned.
- Returns:
- URI of the document where the exception occurred
-
getCause
When an
IOException,MalformedURLException, or other generic exception is thrown while processing an XML document for XIncludes, it is customarily replaced by some form ofXIncludeException. This method allows you to retrieve the original exception. It returns null if no such exception caused thisXIncludeException. -
initCause
When an
IOException,MalformedURLException, or other generic exception is thrown while processing an XML document for XIncludes, it is customarily replaced by some form ofXIncludeException. This method allows you to store the original exception.- Overrides:
initCausein classThrowable- Parameters:
cause- the root cause of this exception- Returns:
- this
XIncludeException - Throws:
IllegalArgumentException- if the cause is this exception (An exception cannot be its own cause.)IllegalStateException- if this method is called twice
-