public class TokenMgrError
extends java.lang.Error
| Constructor and Description |
|---|
TokenMgrError()
No arg constructor.
|
TokenMgrError(boolean eof,
int state,
int line,
int col,
java.lang.String after,
char curr,
int reason)
Full Constructor.
|
TokenMgrError(java.lang.String message,
int reason)
Constructor with message and reason.
|
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
addEscapes(java.lang.String str)
Replaces unprintable characters by their escaped (or unicode escaped)
equivalents in the given string.
|
java.lang.String |
getMessage()
You can also modify the body of this method to customize your error messages.
|
protected static java.lang.String |
lexicalError(boolean eof,
int state,
int line,
int col,
java.lang.String after,
char curr)
Returns a detailed message for the Error when it is thrown by the
token manager to indicate a lexical error.
|
public TokenMgrError()
public TokenMgrError(java.lang.String message,
int reason)
message - error messagereason - one of LEXICAL_ERROR, INVALID_LEXICAL_STATE,
STATIC_LEXER_ERROR, LOOP_DETECTEDpublic TokenMgrError(boolean eof,
int state,
int line,
int col,
java.lang.String after,
char curr,
int reason)
eof - end of file seen?state - lexer stateline - error linecol - error columnafter - string after which the error occuredcurr - current characterreason - one of LEXICAL_ERROR, INVALID_LEXICAL_STATE,
STATIC_LEXER_ERROR, LOOP_DETECTEDprotected static final java.lang.String addEscapes(java.lang.String str)
str - string to be escapedprotected static java.lang.String lexicalError(boolean eof,
int state,
int line,
int col,
java.lang.String after,
char curr)
eof - indicates if EOF caused the lexical errorstate - lexical state in which this error occurredline - line number when the error occurredcol - column number when the error occurredafter - prefix that was seen before this error occurredcurr - the offending characterpublic java.lang.String getMessage()
getMessage in class java.lang.Throwable