|
|||||||||
| 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,
String lineSource,
int lineOffset)
Report an error. |
List<String> |
errors()
Returns the list of errors, or null if there were none. |
EvaluatorException |
runtimeError(String message,
String sourceName,
int line,
String lineSource,
int lineOffset)
Creates an EvaluatorException that may be thrown. |
void |
warning(String message,
String sourceName,
int line,
String lineSource,
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,
String lineSource,
int lineOffset)
ErrorReporter
warning in interface ErrorReportermessage - a String describing the warningsourceName - a String describing the JavaScript source
where the warning occured; typically a filename or URLline - the line number associated with the warninglineSource - the text of the line (may be null)lineOffset - the offset into lineSource where problem was detected
public void error(String message,
String sourceName,
int line,
String lineSource,
int lineOffset)
ErrorReporter
error in interface ErrorReportermessage - a String describing the errorsourceName - a String describing the JavaScript source
where the error occured; typically a filename or URLline - the line number associated with the errorlineSource - the text of the line (may be null)lineOffset - the offset into lineSource where problem was detected
public EvaluatorException runtimeError(String message,
String sourceName,
int line,
String lineSource,
int lineOffset)
ErrorReporter
runtimeError in interface ErrorReportermessage - a String describing the errorsourceName - a String describing the JavaScript source
where the error occured; typically a filename or URLline - the line number associated with the errorlineSource - the text of the line (may be null)lineOffset - the offset into lineSource where problem was detected
public 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 | ||||||||