/**
* {@inheritDoc}
* <p/>
* The method is overridden to throw an exception if the parsed input has an invalid syntax.
*/
@Override
public void syntaxError(Recognizer<?, ?> recognizer, @Nullable Object offendingSymbol, int line,
int charPositionInLine, String msg, @Nullable RecognitionException e) {
String errorMessage = msg;
if (e instanceof InputMismatchException && msg.endsWith(" expecting VALUE")) {
errorMessage += ". Please make sure that all values are surrounded by double quotes.";
}
throw new IllegalArgumentException(errorMessage);
}
OsiamAntlrErrorListener.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:resource-server
作者:
评论列表
文章目录