public class CheckPointedParseException extends ParseException
ParseException that keeps track of the last position up to which
parsing was successful. Backtracking to that position and attempting a parse again is guaranteed
to be successful.expressionString, inserts, message, position| Constructor and Description |
|---|
CheckPointedParseException(String expressionString,
int textPosition,
int tokenPointer,
int checkpointPointer,
List<Token> tokens,
DSLMessage message,
Object... inserts)
Construct a new
CheckPointedParseException. |
| Modifier and Type | Method and Description |
|---|---|
int |
getCheckpointPointer() |
int |
getCheckpointPosition() |
String |
getExpressionStringUntilCheckpoint()
Return the parsed expression until the last known, well formed position.
|
String |
getMessage() |
int |
getTokenPointer() |
List<Token> |
getTokens() |
getExpressionString, getInserts, getMessageCode, getPositionaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic CheckPointedParseException(String expressionString, int textPosition, int tokenPointer, int checkpointPointer, List<Token> tokens, DSLMessage message, Object... inserts)
CheckPointedParseException.expressionString - the raw, untokenized text that was being parsedtextPosition - the text offset where the error occurstokenPointer - the token-index of token where the error occurredcheckpointPointer - the token-index of the last known good tokentokens - the list of tokens that make up expressionStringmessage - the error messageinserts - variables that may be inserted in the error messagepublic String getMessage()
getMessage in class ParseExceptionpublic int getCheckpointPosition()
public String getExpressionStringUntilCheckpoint()
public int getCheckpointPointer()
public int getTokenPointer()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.