| org.mozilla.javascript.ErrorReporter
All known Subclasses: org.mozilla.javascript.DefaultErrorReporter, org.mozilla.javascript.tools.ToolErrorReporter,
ErrorReporter | public interface ErrorReporter (Code) | | This is interface defines a protocol for the reporting of
errors during JavaScript translation or execution.
author: Norris Boyd |
Method Summary | |
void | error(String message, String sourceName, int line, String lineSource, int lineOffset) Report an error.
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. | 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. |
error | void error(String message, String sourceName, int line, String lineSource, int lineOffset)(Code) | | Report an error.
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.
Parameters: message - a String describing the error Parameters: sourceName - a String describing the JavaScript sourcewhere the error occured; typically a filename or URL Parameters: line - the line number associated with the error Parameters: lineSource - the text of the line (may be null) Parameters: lineOffset - the offset into lineSource where problem was detected |
runtimeError | EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset)(Code) | | Creates an EvaluatorException that may be thrown.
runtimeErrors, unlike errors, will always terminate the
current script.
Parameters: message - a String describing the error Parameters: sourceName - a String describing the JavaScript sourcewhere the error occured; typically a filename or URL Parameters: line - the line number associated with the error Parameters: lineSource - the text of the line (may be null) Parameters: lineOffset - the offset into lineSource where problem was detected an EvaluatorException that will be thrown. |
warning | void warning(String message, String sourceName, int line, String lineSource, int lineOffset)(Code) | | Report a warning.
The implementing class may choose to ignore the warning
if it desires.
Parameters: message - a String describing the warning Parameters: sourceName - a String describing the JavaScript sourcewhere the warning occured; typically a filename or URL Parameters: line - the line number associated with the warning Parameters: lineSource - the text of the line (may be null) Parameters: lineOffset - the offset into lineSource where problem was detected |
|
|