antlr-ng Tool Class Hierarchy / index / ErrorManager
Class: ErrorManager
A class to take care of individual Issues. It can notify registered listeners about incomming messages and ensures proper formatting of the messages.
Constructors
Constructor
ts
new ErrorManager(): ErrorManager;
Returns
ErrorManager
Properties
errors
ts
errors: number = 0;
errorTypes
ts
errorTypes: Set<IssueCode>;
All errors that have been generated
warnings
ts
warnings: number = 0;
Methods
addListener()
ts
addListener(tl): void;
Parameters
tl
Returns
void
configure()
ts
configure(formatOptions): void;
Parameters
formatOptions
IToolMessageOptions
Returns
void
emit()
ts
emit(msg): void;
Parameters
msg
Returns
void
error()
ts
error(msg): void;
Parameters
msg
Returns
void
formatWantsSingleLineMessage()
ts
formatWantsSingleLineMessage(): boolean;
Returns
boolean
grammarError()
ts
grammarError(
errorType,
fileName,
position,
arg?,
arg2?,
arg3?): void;
Parameters
errorType
fileName
string
position
null
| { column
: number
; line
: number
; }
arg?
unknown
arg2?
unknown
arg3?
unknown
Returns
void
info()
ts
info(msg): void;
Parameters
msg
string
Returns
void
removeListener()
ts
removeListener(tl): void;
Parameters
tl
Returns
void
removeListeners()
ts
removeListeners(): void;
Returns
void
syntaxError()
ts
syntaxError(
errorType,
fileName,
line,
column,
antlrException?,
arg?,
arg2?): void;
Parameters
errorType
fileName
string
line
number
column
number
antlrException?
RecognitionException
arg?
unknown
arg2?
unknown
Returns
void
toolError()
ts
toolError(
errorType,
e?,
arg?,
arg2?,
arg3?): void;
Raise a predefined message with some number of parameters with no position information.
Parameters
errorType
The identifier of the issue.
e?
Error
arg?
unknown
arg2?
unknown
arg3?
unknown
Returns
void
warning()
ts
warning(msg): void;
Parameters
msg
Returns
void
fatalInternalError()
ts
static fatalInternalError(error, e): void;
Parameters
error
string
e
Error
Returns
void
internalError()
ts
static internalError(error, e?): void;
Parameters
error
string
e?
Error
Returns
void