public class XIncludeException
extends Exception
The generic superclass for all checked exceptions that may be thrown as a result of a violation of XInclude's rules.
Constructor and Description |
---|
XIncludeException(String message)
Constructs an
XIncludeException with the specified
detail message. |
XIncludeException(String message,
String uri)
Creates a new
XIncludeException with a detail
message, line and column numbers, and the URI of the document
that caused the exception. |
XIncludeException(String message,
Throwable cause)
Constructs an
XIncludeException with the specified
detail message and initial cause. |
Modifier and Type | Method and Description |
---|---|
Throwable | 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 of XIncludeException . |
String | getURI()
Returns the URI of the document that caused this exception.
|
Throwable | initCause(Throwable cause)
When an
IOException ,
MalformedURLException , or other generic exception
is thrown while processing an XML document
for XIncludes, it is customarily replaced
by some form of XIncludeException . |
public XIncludeException(String message)
Constructs an XIncludeException
with the specified
detail message.
message
- a string indicating the specific problempublic XIncludeException(String message, Throwable cause)
Constructs an XIncludeException
with the specified
detail message and initial cause. The error message string
message
can later be retrieved by the
method of class Throwable.getMessage()
java.lang.Throwable
.
message
- a string indicating the specific problemcause
- the initial cause of the exceptionpublic XIncludeException(String message, String uri)
Creates a new XIncludeException
with a detail
message, line and column numbers, and the URI of the document
that caused the exception.
message
- a string indicating the specific problemuri
- the URI of the document that caused this exceptionpublic String getURI()
Returns the URI of the document that caused this exception. If the URI is not known, null is returned.
public Throwable 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 of XIncludeException
.
This method allows you to retrieve the original exception.
It returns null if no such exception caused this
XIncludeException
.
getCause
in class Throwable
public Throwable initCause(Throwable cause)
When an IOException
,
MalformedURLException
, or other generic exception
is thrown while processing an XML document
for XIncludes, it is customarily replaced
by some form of XIncludeException
.
This method allows you to store the original exception.
initCause
in class Throwable
cause
- the root cause of this exceptionXIncludeException
IllegalArgumentException
- if the cause is this exception
(An exception cannot be its own cause.)IllegalStateException
- if this method is called twiceCopyright 2002-2023 Elliotte Rusty Harold
elharo@ibiblio.org