org.jaxen
Class XPathSyntaxException
public class XPathSyntaxException
Indicates an error during parsing of an XPath expression.
String | getMultilineMessage() - Retrieve the friendly multi-line error message.
|
int | getPosition() - Retrieve the position of the error.
|
String | getPositionMarker() - Retrieve a string useful for denoting where
the error occurred.
|
String | getXPath() - Retrieve the expression containing the error.
|
position
private int position
The position of the error
serialVersionUID
private static final long serialVersionUID
xpath
private String xpath
The textual XPath expression
XPathSyntaxException
public XPathSyntaxException(String xpath,
int position,
String message)
Constructor
xpath
- the erroneous XPath expressionposition
- the position of the errormessage
- the error message
XPathSyntaxException
public XPathSyntaxException(XPathSyntaxException e)
Create a new XPathSyntaxException wrapping an existing
org.jaxen.saxpath.XPathSyntaxException
.
e
- the exception that caused this exception
getMultilineMessage
public String getMultilineMessage()
Retrieve the friendly multi-line error message.
This returns a multi-line string that contains
the original erroneous XPath expression with a
marker underneath indicating exactly where the
error occurred.
- the multi-line error message
getPosition
public int getPosition()
Retrieve the position of the error.
- the position of the error
getPositionMarker
public String getPositionMarker()
Retrieve a string useful for denoting where
the error occurred.
This is a string composed of whitespace and
a marker at the position (see
getPosition()
)
of the error. This is useful for creating
friendly multi-line error displays.
- the error position marker
getXPath
public String getXPath()
Retrieve the expression containing the error.