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:
java.io.Serializable
public class XPathSyntaxException extends SAXPathException
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XPathSyntaxException(java.lang.String xpath, int position, java.lang.String message)Creates a new XPathSyntaxException.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMultilineMessage()Returns a long formatted description of the error, including line breaks.intgetPosition()Returns the index of the character at which the syntax error was detected in the XPath expression.java.lang.StringgetXPath()Returns the syntactically incorrect XPath expression.java.lang.StringtoString()-
Methods inherited from class org.jaxen.saxpath.SAXPathException
getCause, initCause, printStackTrace, printStackTrace
-
-
-
-
Constructor Detail
-
XPathSyntaxException
public XPathSyntaxException(java.lang.String xpath, int position, java.lang.String message)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 Detail
-
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
public java.lang.String getXPath()
Returns the syntactically incorrect XPath expression.
- Returns:
- the syntactically incorrect XPath expression
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
getMultilineMessage
public java.lang.String getMultilineMessage()
Returns a long formatted description of the error, including line breaks.
- Returns:
- a longer description of the error on multiple lines
-
-