public interface ErrorReporter
| Modifier and Type | Method and Description |
|---|---|
void |
error(java.lang.String message,
java.lang.String sourceName,
int line,
java.lang.String lineSource,
int lineOffset)
Report an error.
|
EvaluatorException |
runtimeError(java.lang.String message,
java.lang.String sourceName,
int line,
java.lang.String lineSource,
int lineOffset)
Creates an EvaluatorException that may be thrown.
|
void |
warning(java.lang.String message,
java.lang.String sourceName,
int line,
java.lang.String lineSource,
int lineOffset)
Report a warning.
|
void warning(java.lang.String message,
java.lang.String sourceName,
int line,
java.lang.String lineSource,
int lineOffset)
The implementing class may choose to ignore the warning if it desires.
message - 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 detectedvoid error(java.lang.String message,
java.lang.String sourceName,
int line,
java.lang.String lineSource,
int lineOffset)
The implementing class is free to throw an exception if it desires.
If execution has not yet begun, the JavaScript engine is free to find additional errors rather than terminating the translation. It will not execute a script that had errors, however.
message - 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 detectedEvaluatorException runtimeError(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)
runtimeErrors, unlike errors, will always terminate the current script.
message - 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