|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.javascript.rhino.SimpleErrorReporter
public class SimpleErrorReporter
A simple ErrorReporter
that collects warnings and errors and makes
them accessible via errors()
and warnings()
.
Constructor Summary | |
---|---|
SimpleErrorReporter()
|
Method Summary | |
---|---|
void |
error(String message,
String sourceName,
int line,
int lineOffset)
Report an error. |
List<String> |
errors()
Returns the list of errors, or null if there were none. |
void |
warning(String message,
String sourceName,
int line,
int lineOffset)
Report a warning. |
List<String> |
warnings()
Returns the list of warnings, or null if there were none. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleErrorReporter()
Method Detail |
---|
public void warning(String message, String sourceName, int line, int lineOffset)
ErrorReporter
warning
in interface ErrorReporter
message
- 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(String message, String sourceName, int line, int lineOffset)
ErrorReporter
error
in interface ErrorReporter
message
- 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 List<String> errors()
null
if there were none.
public List<String> warnings()
null
if there were none.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |