Class XPathSyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jaxen.saxpath.SAXPathException
org.jaxen.JaxenException
org.jaxen.XPathSyntaxException
- All Implemented Interfaces:
Serializable
Indicates an error during parsing of an XPath expression.
- Author:
- bob mcwhirter, James Strachan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXPathSyntaxException(String xpath, int position, String message) ConstructorCreate a new XPathSyntaxException wrapping an existingorg.jaxen.saxpath.XPathSyntaxException. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the friendly multi-line error message.intRetrieve the position of the error.Retrieve a string useful for denoting where the error occurred.getXPath()Retrieve the expression containing the error.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
XPathSyntaxException
Create a new XPathSyntaxException wrapping an existingorg.jaxen.saxpath.XPathSyntaxException.- Parameters:
e- the exception that caused this exception
-
XPathSyntaxException
-
-
Method Details
-
getPosition
public int getPosition()Retrieve the position of the error.- Returns:
- the position of the error
-
getXPath
Retrieve the expression containing the error.- Returns:
- the erroneous expression
-
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.- Returns:
- the error position marker
-
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.
- Returns:
- the multi-line error message
-