public class ErrorHandler extends Object
| Constructor and Description |
|---|
ErrorHandler(ParserOptions options)
Default
ErrorHandler that outputs to System.err. |
ErrorHandler(PrintStream stream,
ParserOptions options)
Construct a new
ErrorHandler that outputs to a provided PrintStream. |
| Modifier and Type | Method and Description |
|---|---|
void |
checkIfShouldExit()
Check if the parser should exit.
|
void |
error(String msg)
Record a message signifying an error condition.
|
int |
errorCount()
The count of errors encountered.
|
String |
toString() |
void |
warning(String msg)
Record a message signifying an warning condition.
|
int |
warningCount()
The count of warnings encountered.
|
public ErrorHandler(PrintStream stream, ParserOptions options)
ErrorHandler that outputs to a provided PrintStream.stream - to which output should be sent.options - the parsing options.public ErrorHandler(ParserOptions options)
ErrorHandler that outputs to System.err.options - the parsing options.public void error(String msg)
msg - signifying an error.public void warning(String msg)
msg - signifying an warning.public void checkIfShouldExit()
IllegalStateException - if there are errors or warnings recorded.public int errorCount()
public int warningCount()
Copyright © 2013 Real Logic Ltd. All Rights Reserved.