public class SimpleErrorReporter extends java.lang.Object implements ErrorReporter
ErrorReporter that collects warnings and errors and makes
them accessible via errors() and warnings().| Constructor and Description |
|---|
SimpleErrorReporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
error(java.lang.String message,
java.lang.String sourceName,
int line,
int lineOffset)
Report an error.
|
java.util.List<java.lang.String> |
errors()
Returns the list of errors, or
null if there were none. |
void |
warning(java.lang.String message,
java.lang.String sourceName,
int line,
int lineOffset)
Report a warning.
|
java.util.List<java.lang.String> |
warnings()
Returns the list of warnings, or
null if there were none. |
public void warning(java.lang.String message,
java.lang.String sourceName,
int line,
int lineOffset)
ErrorReporterwarning in interface ErrorReportermessage - a String describing the warningsourceName - a String describing the JavaScript source
where the warning occurred; typically a filename or URLline - the line number associated with the warninglineOffset - the offset into lineSource where problem was detectedpublic void error(java.lang.String message,
java.lang.String sourceName,
int line,
int lineOffset)
ErrorReportererror in interface ErrorReportermessage - a String describing the errorsourceName - a String describing the JavaScript source
where the error occurred; typically a filename or URLline - the line number associated with the errorlineOffset - the offset into lineSource where problem was detectedpublic java.util.List<java.lang.String> errors()
null if there were none.public java.util.List<java.lang.String> warnings()
null if there were none.