public class XPathSyntaxException extends SAXPathException
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
lineSeparator |
private int |
position |
private static long |
serialVersionUID |
private java.lang.String |
xpath |
Constructor and Description |
---|
XPathSyntaxException(java.lang.String xpath,
int position,
java.lang.String message)
Creates a new XPathSyntaxException.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMultilineMessage()
Returns a long formatted description of the error,
including line breaks.
|
int |
getPosition()
Returns the index of the character at which the syntax error was detected
in the XPath expression.
|
private java.lang.String |
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. |
java.lang.String |
getXPath()
Returns the syntactically incorrect XPath expression.
|
java.lang.String |
toString() |
getCause, initCause, printStackTrace, printStackTrace
private static final long serialVersionUID
private java.lang.String xpath
private int position
private static final java.lang.String lineSeparator
public XPathSyntaxException(java.lang.String xpath, int position, java.lang.String message)
xpath
- the incorrect XPath expressionposition
- the index of the character at which the syntax error was detectedmessage
- the detail messagepublic int getPosition()
Returns the index of the character at which the syntax error was detected in the XPath expression.
public java.lang.String getXPath()
Returns the syntactically incorrect XPath expression.
public java.lang.String toString()
toString
in class java.lang.Throwable
private java.lang.String 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.
public java.lang.String getMultilineMessage()
Returns a long formatted description of the error, including line breaks.