Package net.sf.saxon.trans
Class XPathException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.xml.transform.TransformerException
-
- net.sf.saxon.trans.XPathException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
DynamicError
,StaticError
,ValidationException
public abstract class XPathException extends javax.xml.transform.TransformerException
XPathException is used to indicate an error in an XPath expression. It will generally be either a StaticError or a DynamicError; ValidationExceptions (arising from schema validation) form a third category- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XPathException.Circularity
Subclass used to report circularities
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
errorCode
(package private) java.lang.String
errorCodeNamespace
(package private) Value
errorObject
-
Constructor Summary
Constructors Constructor Description XPathException(java.lang.String message)
XPathException(java.lang.String message, java.lang.Throwable err)
XPathException(java.lang.String message, javax.xml.transform.SourceLocator loc)
XPathException(java.lang.String message, javax.xml.transform.SourceLocator loc, java.lang.Throwable err)
XPathException(java.lang.Throwable err)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getErrorCodeLocalPart()
Get the local part of the name of the error codejava.lang.String
getErrorCodeNamespace()
Get the namespace URI part of the name of the error codeValue
getErrorObject()
boolean
hasBeenReported()
boolean
isTypeError()
StaticError
makeStatic()
Force an exception to a static errorvoid
setErrorCode(java.lang.String code)
Set the error code.void
setErrorCode(java.lang.String namespace, java.lang.String code)
Set the error code.void
setErrorObject(Value value)
void
setHasBeenReported()
void
setIsTypeError(boolean is)
-
Methods inherited from class javax.xml.transform.TransformerException
getCause, getException, getLocationAsString, getLocator, getMessageAndLocation, initCause, printStackTrace, printStackTrace, printStackTrace, setLocator
-
-
-
-
Field Detail
-
errorCodeNamespace
java.lang.String errorCodeNamespace
-
errorCode
java.lang.String errorCode
-
errorObject
Value errorObject
-
-
Constructor Detail
-
XPathException
public XPathException(java.lang.String message)
-
XPathException
public XPathException(java.lang.Throwable err)
-
XPathException
public XPathException(java.lang.String message, java.lang.Throwable err)
-
XPathException
public XPathException(java.lang.String message, javax.xml.transform.SourceLocator loc)
-
XPathException
public XPathException(java.lang.String message, javax.xml.transform.SourceLocator loc, java.lang.Throwable err)
-
-
Method Detail
-
makeStatic
public StaticError makeStatic()
Force an exception to a static error
-
setIsTypeError
public void setIsTypeError(boolean is)
-
isTypeError
public boolean isTypeError()
-
setErrorCode
public void setErrorCode(java.lang.String code)
Set the error code. The error code is a QName; this method sets the local part of the name, and if no other namespace has been set, it sets the namespace of the error code to the standard system namespaceNamespaceConstant.ERR
- Parameters:
code
- The local part of the name of the error code
-
setErrorCode
public void setErrorCode(java.lang.String namespace, java.lang.String code)
Set the error code. The error code is a QName; this method sets both parts of the name.- Parameters:
namespace
- The namespace URI part of the name of the error codecode
- The local part of the name of the error code
-
getErrorCodeLocalPart
public java.lang.String getErrorCodeLocalPart()
Get the local part of the name of the error code- Returns:
- the local part of the name of the error code
-
getErrorCodeNamespace
public java.lang.String getErrorCodeNamespace()
Get the namespace URI part of the name of the error code- Returns:
- the namespace URI part of the name of the error code
-
setErrorObject
public void setErrorObject(Value value)
-
getErrorObject
public Value getErrorObject()
-
setHasBeenReported
public void setHasBeenReported()
-
hasBeenReported
public boolean hasBeenReported()
-
-