public class TokenMgrError extends Error
ParseException
.
This is a modified version of file generated by JavaCC from FTL.jj.
You can modify this class to customize the error reporting mechanisms so long as the public interface
remains compatible with the original.ParseException
,
Serialized FormConstructor and Description |
---|
TokenMgrError() |
TokenMgrError(boolean EOFSeen,
int lexState,
int errorLine,
int errorColumn,
String errorAfter,
char curChar,
int reason) |
TokenMgrError(String detail,
int reason) |
TokenMgrError(String detail,
int reason,
int errorLine,
int errorColumn)
Deprecated.
If you know the end position, use
TokenMgrError(String, int, int, int, int, int) instead. |
TokenMgrError(String detail,
int reason,
int errorLine,
int errorColumn,
int endLineNumber,
int endColumnNumber) |
Modifier and Type | Method and Description |
---|---|
protected static String |
addEscapes(String str)
Replaces unprintable characters by their espaced (or unicode escaped)
equivalents in the given string
|
Integer |
getColumnNumber()
1-based column number of the unexpected character(s).
|
String |
getDetail() |
Integer |
getEndColumnNumber()
Returns the 1-based column at which the last character of the wrong section is.
|
Integer |
getEndLineNumber()
Returns the 1-based line at which the last character of the wrong section is.
|
Integer |
getLineNumber()
1-based line number of the unexpected character(s).
|
String |
getMessage()
You can also modify the body of this method to customize your error messages.
|
protected static String |
LexicalError(boolean EOFSeen,
int lexState,
int errorLine,
int errorColumn,
String errorAfter,
char curChar)
Returns a detailed message for the Error when it's thrown by the
token manager to indicate a lexical error.
|
ParseException |
toParseException(Template template) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public TokenMgrError()
public TokenMgrError(String detail, int reason)
public TokenMgrError(String detail, int reason, int errorLine, int errorColumn)
TokenMgrError(String, int, int, int, int, int)
instead.public TokenMgrError(String detail, int reason, int errorLine, int errorColumn, int endLineNumber, int endColumnNumber)
public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason)
protected static final String addEscapes(String str)
protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar)
public String getMessage()
getMessage
in class Throwable
public Integer getLineNumber()
public Integer getColumnNumber()
public Integer getEndLineNumber()
getLineNumber()
because the lexer can only point to the single character that
doesn't match any patterns.public Integer getEndColumnNumber()
getColumnNumber()
because the lexer can only point to the single character that
doesn't match any patterns.public String getDetail()
public ParseException toParseException(Template template)
Copyright © 2016. All Rights Reserved.