net.sf.saxon.trans
public class XPathException extends TransformerException
Nested Class Summary | |
---|---|
static class | XPathException.Circularity
Subclass of XPathException used to report circularities |
Field Summary | |
---|---|
XPathContext | context |
StructuredQName | errorCode |
Value | errorObject |
Constructor Summary | |
---|---|
XPathException(String message)
Create an XPathException with an error message | |
XPathException(Throwable err)
Create an XPathException that wraps another exception | |
XPathException(String message, Throwable err)
Create an XPathException that supplies an error message and wraps an underlying exception | |
XPathException(String message, SourceLocator loc)
Create an XPathException that supplies an error message and supplies location information | |
XPathException(String message, SourceLocator loc, Throwable err)
Create an XPathException that supplies an error message and wraps an underlying exception
and supplies location information | |
XPathException(String message, String errorCode)
Create an XPathException that supplies an error message and an error code | |
XPathException(String message, String errorCode, XPathContext context)
Create an XPathException that supplies an error message and an error code and provides the
dynamic context |
Method Summary | |
---|---|
String | getErrorCodeLocalPart()
Get the local part of the name of the error code |
String | getErrorCodeNamespace()
Get the namespace URI part of the name of the error code |
StructuredQName | getErrorCodeQName()
Get the error code as a QName |
Value | getErrorObject()
Get the error object associated with this error. |
XPathContext | getXPathContext()
Get the dynamic context at the time the exception occurred |
boolean | hasBeenReported()
Ask whether this error is marked to indicate that it has already been reported to the error listener,
and should not be reported again |
boolean | isGlobalError()
Ask whether this exception originated while evaluating a global
variable reference, and is therefore to be reported regardless of the try/catch
context surrounding the variable reference |
boolean | isStaticError()
Ask whether this exception represents a static error |
boolean | isTypeError()
Ask whether this exception represents a type error |
XPathException | makeStatic()
Force an exception to a static error |
static XPathException | makeXPathException(TransformerException err)
Create an XPathException from a JAXP TransformerException. |
void | maybeSetContext(XPathContext context)
Set the context of a message, only if it is not already set |
void | maybeSetErrorCode(String code)
Set the error code, provided it has not already been set.
|
void | maybeSetLocation(SourceLocator locator)
Set the location of a message, only if it is not already set |
void | setErrorCode(String code)
Set the error code. |
void | setErrorCodeQName(StructuredQName code)
Set the error code. |
void | setErrorObject(Value value)
Set the error object associated with this error. |
void | setHasBeenReported(boolean reported)
Mark this error to indicate that it has already been reported to the error listener, and should not be
reported again |
void | setIsGlobalError(boolean is)
Mark this exception to indicate that it originated while evaluating a global
variable reference, and is therefore to be reported regardless of the try/catch
context surrounding the variable reference |
void | setIsStaticError(boolean is)
Mark this exception to indicate that it represents (or does not represent) a static error |
void | setIsTypeError(boolean is)
Mark this exception to indicate that it represents (or does not represent) a type error |
void | setXPathContext(XPathContext context)
Set dynamic context information in the exception object |
Parameters: message the message explaining what is wrong. This should not include location information.
Parameters: err the wrapped error or exception
Parameters: message the error message (which should generally explain what Saxon was doing when the underlying exception occurred) err the underlying exception (the cause of this exception)
Parameters: message the error message loc indicates where in the user-written query or stylesheet (or sometimes in a source document) the error occurred
Parameters: message the error message (which should generally explain what Saxon was doing when the underlying exception occurred) loc indicates where in the user-written query or stylesheet (or sometimes in a source document) the error occurred err the underlying exception (the cause of this exception)
Parameters: message the error message errorCode the error code - an eight-character code, which is taken to be in the standard system error code namespace
Parameters: message the error message errorCode the error code - an eight-character code, which is taken to be in the standard system error code namespace context the dynamic evaluation context
Returns: the local part of the name of the error code
Returns: the namespace URI part of the name of the error code
Returns: the error code as a QName
Returns: the error object, as supplied to the fn:error() function
Returns: the dynamic context if known; otherwise null
Returns: true if this error has already been reported
Returns: true if this exception is a global variable error
Returns: true if this exception is a static error
Returns: true if this exception is a type error
Returns: this exception, marked as a static error
Parameters: err the supplied JAXP TransformerException
Returns: an XPathException obtained from the supplied TransformerException
Parameters: context the current XPath context (or null)
Parameters: code The local part of the name of the error code
Parameters: locator the current location (or null)
Parameters: code The local part of the name of the error code
Parameters: code The error code as a QName
Parameters: value the error object, as supplied to the fn:error() function
Parameters: reported
Parameters: is true if this exception is a global variable error
Parameters: is true if this exception is a static error
Parameters: is true if this exception is a type error
Parameters: context the dynamic context at the time the exception occurred