Package org.jaxen.saxpath
Class XPathSyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jaxen.saxpath.SAXPathException
org.jaxen.saxpath.XPathSyntaxException
- All Implemented Interfaces:
Serializable
Represents a syntax error in an XPath expression.
This is a compile-time error that is detectable irrespective of
the context in which the XPath expression is evaluated.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXPathSyntaxException
(String xpath, int position, String message) Creates a new XPathSyntaxException. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
XPathSyntaxException
Creates a new XPathSyntaxException.- Parameters:
xpath
- the incorrect XPath expressionposition
- the index of the character at which the syntax error was detectedmessage
- the detail message
-
-
Method Details
-
getPosition
public int getPosition()Returns the index of the character at which the syntax error was detected in the XPath expression.
- Returns:
- the character index in the XPath expression at which the syntax error was detected
-
getXPath
Returns the syntactically incorrect XPath expression.
- Returns:
- the syntactically incorrect XPath expression
-
toString
-
getMultilineMessage
Returns a long formatted description of the error, including line breaks.
- Returns:
- a longer description of the error on multiple lines
-