| Modifier and Type | Field and Description |
|---|---|
| protected final CompilerConfiguration | configuration
Configuration and other settings that control processing |
| protected LinkedList | errors
ErrorMessages collected during processing |
| private static final long | |
| protected LinkedList | warnings
WarningMessages collected during processing |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | addErrorAndContinue(final Message message)
Adds an error to the message set, but does not cause a failure. |
| public void | |
| public void | addFatalError(final Message message)
Adds an error to the message set and throws CompilationFailedException. |
| public void | |
| public void | addWarning(final int importance, final String text, final CSTNode context, final SourceUnit source)
Adds a warning to the message set if it is relevant. |
| public void | addWarning(final int importance, final String text, final Object data, final CSTNode context, final SourceUnit source)
Adds a warning to the message set if it is relevant. |
| protected void | |
| public CompilerConfiguration | |
| public Message | |
| public int | |
| public List | |
| public Exception | getException(final int index)
Returns the specified error's underlying Exception, or null if it isn't one. |
| public Message | |
| public SyntaxException | getSyntaxError(final int index)
Returns the specified error's underlying SyntaxException, or null if it isn't one. |
| public WarningMessage | |
| public int | |
| public List | |
| public boolean | |
| public boolean | |
| private void | |
| public void | write(final PrintWriter writer, final Janitor janitor)
Writes error messages to the specified PrintWriter. |
| configuration | back to summary |
|---|---|
| protected final CompilerConfiguration configuration Configuration and other settings that control processing | |
| errors | back to summary |
|---|---|
| protected LinkedList<Message> errors ErrorMessages collected during processing | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| warnings | back to summary |
|---|---|
| protected LinkedList<WarningMessage> warnings WarningMessages collected during processing | |
| ErrorCollector | back to summary |
|---|---|
| public ErrorCollector(final CompilerConfiguration configuration) Initialize the ErrorReporter. | |
| addCollectorContents | back to summary |
|---|---|
| public void addCollectorContents(final ErrorCollector that) | |
| addError | back to summary |
|---|---|
| public void addError(final Message message) throws CompilationFailedException Adds a non-fatal error to the message set, which may cause a failure if the error threshold is exceeded. The message is not required to have a source line and column specified, but it is best practice to try and include that information. | |
| addError | back to summary |
|---|---|
| public void addError(final Message message, final boolean fatal) throws CompilationFailedException Adds an optionally-fatal error to the message set. The message is not required to have a source line and column specified, but it is best practice to try and include that information.
| |
| addError | back to summary |
|---|---|
| public void addError(final SyntaxException error, final SourceUnit source) throws CompilationFailedException | |
| addError | back to summary |
|---|---|
| public void addError(final String error, final CSTNode context, final SourceUnit source) throws CompilationFailedException | |
| addErrorAndContinue | back to summary |
|---|---|
| public void addErrorAndContinue(final String error, final ASTNode node, final SourceUnit source) | |
| addErrorAndContinue | back to summary |
|---|---|
| public void addErrorAndContinue(final SyntaxException error, final SourceUnit source) | |
| addErrorAndContinue | back to summary |
|---|---|
| public void addErrorAndContinue(final Message message) Adds an error to the message set, but does not cause a failure. The message is not required to have a source line and column specified, but it is best practice to try and include that information. | |
| addException | back to summary |
|---|---|
| public void addException(final Exception exception, final SourceUnit source) throws CompilationFailedException | |
| addFatalError | back to summary |
|---|---|
| public void addFatalError(final Message message) throws CompilationFailedException Adds an error to the message set and throws CompilationFailedException. | |
| addWarning | back to summary |
|---|---|
| public void addWarning(final WarningMessage message) Adds a warning to the message set. | |
| addWarning | back to summary |
|---|---|
| public void addWarning(final int importance, final String text, final CSTNode context, final SourceUnit source) Adds a warning to the message set if it is relevant. | |
| addWarning | back to summary |
|---|---|
| public void addWarning(final int importance, final String text, final Object data, final CSTNode context, final SourceUnit source) Adds a warning to the message set if it is relevant. | |
| failIfErrors | back to summary |
|---|---|
| protected void failIfErrors() throws CompilationFailedException Causes the current phase to fail by throwing a CompilationFailedException. | |
| getConfiguration | back to summary |
|---|---|
public CompilerConfiguration getConfiguration()
| |
| getError | back to summary |
|---|---|
| public Message getError(final int index) Returns the specified error message, or null. | |
| getErrorCount | back to summary |
|---|---|
| public int getErrorCount() Returns the number of errors. | |
| getErrors | back to summary |
|---|---|
| public List Returns the list of errors, or null if there are none. | |
| getException | back to summary |
|---|---|
| public Exception getException(final int index) Returns the specified error's underlying Exception, or null if it isn't one. | |
| getLastError | back to summary |
|---|---|
| public Message getLastError() Returns the last error reported. | |
| getSyntaxError | back to summary |
|---|---|
| public SyntaxException getSyntaxError(final int index) Returns the specified error's underlying SyntaxException, or null if it isn't one. | |
| getWarning | back to summary |
|---|---|
| public WarningMessage getWarning(final int index) Returns the specified warning message, or null. | |
| getWarningCount | back to summary |
|---|---|
| public int getWarningCount() Returns the number of warnings. | |
| getWarnings | back to summary |
|---|---|
| public List Returns the list of warnings, or null if there are none. | |
| hasErrors | back to summary |
|---|---|
| public boolean hasErrors() Returns true if there are any errors pending. | |
| hasWarnings | back to summary |
|---|---|
| public boolean hasWarnings() Returns true if there are any warnings pending. | |
| write | back to summary |
|---|---|
| private void write(final PrintWriter writer, final Janitor janitor, final List<? extends Message> messages, final String txt) | |
| write | back to summary |
|---|---|
| public void write(final PrintWriter writer, final Janitor janitor) Writes error messages to the specified PrintWriter. | |