Package org.apache.commons.jexl3.parser
Class ParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.commons.jexl3.parser.ParseException
- All Implemented Interfaces:
Serializable
,JavaccError
This exception is thrown when parse errors are encountered.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Last correct input before error occurs.private int
Error column.private int
Error line.private static final long
The version identifier. -
Constructor Summary
ConstructorsConstructorDescriptionDefault ctor.ParseException
(String message) Constructor with message.ParseException
(Token currentToken, int[][] expectedTokenSequences, String[] tokenImage) This constructor is used by the method "generateParseException" in the generated parser. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDThe version identifier.- See Also:
-
after
Last correct input before error occurs. -
line
private int lineError line. -
column
private int columnError column.
-
-
Constructor Details
-
ParseException
This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor generates a new object of this type with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set.- Parameters:
currentToken
- This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token following this token will (therefore) be the first error token.expectedTokenSequences
- Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.tokenImage
- This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.
-
ParseException
public ParseException()Default ctor. -
ParseException
Constructor with message.
-
-
Method Details
-
getLine
public int getLine()Description copied from interface:JavaccError
Gets the line number.- Specified by:
getLine
in interfaceJavaccError
- Returns:
- line number.
-
getColumn
public int getColumn()Description copied from interface:JavaccError
Gets the column number.- Specified by:
getColumn
in interfaceJavaccError
- Returns:
- the column.
-
getAfter
Description copied from interface:JavaccError
Gets the last correct input.- Specified by:
getAfter
in interfaceJavaccError
- Returns:
- the string after which the error occurred
-