public class XmlProcessingException extends java.lang.Object implements XmlProcessingError
XmlProcessingError
interface that wraps an XPathException
object.Constructor and Description |
---|
XmlProcessingException(XPathException exception)
Create an XmlProcessingException wrapping an XPathException
|
Modifier and Type | Method and Description |
---|---|
XmlProcessingException |
asWarning()
Return an XmlProcessingError containing the same information, but to be treated as
a warning condition
|
java.lang.Throwable |
getCause()
Return an underlying exception.
|
QName |
getErrorCode()
Get the error code, as a QName.
|
java.lang.String |
getFatalErrorMessage()
Ask whether this error is to be treated as fatal, and if so, return the relevant messsage
|
HostLanguage |
getHostLanguage() |
Location |
getLocation()
Get the location information associated with the error
|
java.lang.String |
getMessage()
Get the error message associated with this error
|
java.lang.String |
getPath()
Get the absolute XPath expression that identifies the node within its document
where the error occurred, if available
|
XPathException |
getXPathException()
Get the wrapped exception
|
boolean |
isAlreadyReported()
Ask whether this static error has already been reported
|
boolean |
isStaticError()
Ask whether this is a static error, defined as an error that can be detected during
static analysis of a stylesheet, query, schema, or XPath expression.
|
boolean |
isTypeError()
Ask whether this is a type error.
|
boolean |
isWarning()
Ask whether this error is being reported as a warning condition.
|
void |
setAlreadyReported(boolean reported)
Say whether this error has already been reported
|
void |
setFatal(java.lang.String message)
Indicate that this error is to be treated as fatal; that is, execution will be abandoned
after reporting this error.
|
void |
setWarning(boolean warning) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getModuleUri
getColumnNumber, getInstructionName, getLineNumber
public XmlProcessingException(XPathException exception)
exception
- the wrapped exceptionpublic XPathException getXPathException()
public HostLanguage getHostLanguage()
getHostLanguage
in interface XmlProcessingError
public boolean isStaticError()
XmlProcessingError
isStaticError
in interface XmlProcessingError
public boolean isTypeError()
XmlProcessingError
isTypeError
in interface StaticError
isTypeError
in interface XmlProcessingError
public QName getErrorCode()
XmlProcessingError
getErrorCode
in interface StaticError
getErrorCode
in interface XmlProcessingError
public java.lang.String getMessage()
XmlProcessingError
getMessage
in interface StaticError
getMessage
in interface XmlProcessingError
public Location getLocation()
XmlProcessingError
getLocation
in interface StaticError
getLocation
in interface XmlProcessingError
public boolean isWarning()
XmlProcessingError
isWarning
in interface StaticError
isWarning
in interface XmlProcessingError
public java.lang.String getPath()
XmlProcessingError
getPath
in interface StaticError
getPath
in interface XmlProcessingError
public java.lang.Throwable getCause()
XmlProcessingError
getCause
in interface XmlProcessingError
public void setWarning(boolean warning)
public XmlProcessingException asWarning()
XmlProcessingError
asWarning
in interface XmlProcessingError
public void setFatal(java.lang.String message)
ErrorReporter
, for example
if the error is considered so severe that further processing is not worthwhile, or if
too many errors have been signalled. There is no absolute guarantee that setting this
property will cause execution to be abandoned. If a dynamic error is marked as fatal, it
will generally not be caught by any try/catch mechanism within the stylesheet or query.setFatal
in interface StaticError
message
- an error message giving the reason for the fatal errorpublic java.lang.String getFatalErrorMessage()
getFatalErrorMessage
in interface StaticError
public boolean isAlreadyReported()
isAlreadyReported
in interface XmlProcessingError
public void setAlreadyReported(boolean reported)
setAlreadyReported
in interface XmlProcessingError
reported
- true if the error has been reportedCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.