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:
java.io.Serializable,JavaccError
public class ParseException extends java.lang.Exception implements JavaccError
This exception is thrown when parse errors are encountered.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringafterLast correct input before error occurs.private intcolumnError column.private intlineError line.private static longserialVersionUIDThe version identifier.
-
Constructor Summary
Constructors Constructor Description ParseException()Constructs a new exception withnullas its detail message.ParseException(java.lang.String message)Constructs a new exception with the specified detail message.ParseException(Token currentToken, int[][] expectedTokenSequences, java.lang.String[] tokenImage)This constructor is used by the method "generateParseException" in the generated parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAfter()Gets the last correct input.intgetColumn()Gets the column number.intgetLine()Gets the line number.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The version identifier.- See Also:
- Constant Field Values
-
after
private java.lang.String after
Last correct input before error occurs.
-
line
private int line
Error line.
-
column
private int column
Error column.
-
-
Constructor Detail
-
ParseException
public ParseException()
Constructs a new exception withnullas its detail message. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable).
-
ParseException
public ParseException(java.lang.String message)
Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable).- Parameters:
message- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()method.
-
ParseException
public ParseException(Token currentToken, int[][] expectedTokenSequences, java.lang.String[] tokenImage)
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.
-
-
Method Detail
-
getAfter
public java.lang.String getAfter()
Description copied from interface:JavaccErrorGets the last correct input.- Specified by:
getAfterin interfaceJavaccError- Returns:
- the string after which the error occurred
-
getColumn
public int getColumn()
Description copied from interface:JavaccErrorGets the column number.- Specified by:
getColumnin interfaceJavaccError- Returns:
- the column.
-
getLine
public int getLine()
Description copied from interface:JavaccErrorGets the line number.- Specified by:
getLinein interfaceJavaccError- Returns:
- line number.
-
-