Class ParseFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.aquima.interactions.foundation.exception.AppException
com.aquima.interactions.expressions.ParseException
com.aquima.interactions.expressions.ParseFailureException
- All Implemented Interfaces:
Serializable
This exception is thrown when the syntactic analysis failed.
- Since:
- 6.0
- Author:
- F. van der Meer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParseFailureException
(int symbol, Position position, Object token) Construct a parse failure exception at the specified character position. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the character position.Returns the position object information for the current error.int
This function returns the symbol id for the parse error, this symbol can be found in the symtable of the corresponding parser.getToken()
This method returns the token for which the exception occurred.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ParseFailureException
Construct a parse failure exception at the specified character position. Optionally the token which caused the error can be passed as well.- Parameters:
symbol
- The symbol at which the parse error occurred.position
- The character position of the expression where the exception occurred ( not byte position )token
- The token which caused the failure.
-
-
Method Details
-
getSymbol
public int getSymbol()This function returns the symbol id for the parse error, this symbol can be found in the symtable of the corresponding parser.- Returns:
- The symbol for the corresponding parser.
-
getOffset
public int getOffset()Returns the character position.- Returns:
- The character position which designates the failure position.
-
getPosition
Returns the position object information for the current error.- Returns:
- A position object.
-
getToken
This method returns the token for which the exception occurred.- Returns:
- The object token which can be null when it was not known.
-