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:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXPathSyntaxException
(String xpath, int position, String message) Creates a new XPathSyntaxException. -
Method Summary
Modifier and TypeMethodDescriptionReturns a long formatted description of the error, including line breaks.int
Returns the index of the character at which the syntax error was detected in the XPath expression.private String
Returns a string in the form" ^"
which, when placed on the line below the XPath expression in a monospaced font, should point to the location of the error.getXPath()
Returns the syntactically incorrect XPath expression.toString()
Methods inherited from class org.jaxen.saxpath.SAXPathException
getCause, initCause, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
xpath
-
position
private int position -
lineSeparator
-
-
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
-
getPositionMarker
Returns a string in the form
" ^"
which, when placed on the line below the XPath expression in a monospaced font, should point to the location of the error.- Returns:
- the position marker
-
getMultilineMessage
Returns a long formatted description of the error, including line breaks.
- Returns:
- a longer description of the error on multiple lines
-