Package org.mozilla.javascript
Interface ErrorReporter
- 
- All Known Subinterfaces:
- IdeErrorReporter
 - All Known Implementing Classes:
- ErrorCollector,- ToolErrorReporter
 
 public interface ErrorReporterThis is interface defines a protocol for the reporting of errors during JavaScript translation or execution.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voiderror(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)Report an error.EvaluatorExceptionruntimeError(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)Creates an EvaluatorException that may be thrown.voidwarning(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)Report a warning.
 
- 
- 
- 
Method Detail- 
warningvoid warning(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)Report a warning.The implementing class may choose to ignore the warning if it desires. - Parameters:
- message- a String describing the warning
- sourceName- a String describing the JavaScript source where the warning occured; typically a filename or URL
- line- the line number associated with the warning
- lineSource- the text of the line (may be null)
- lineOffset- the offset into lineSource where problem was detected
 
 - 
errorvoid error(java.lang.String message, java.lang.String sourceName, int line, java.lang.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. It will not execute a script that had errors, however. - Parameters:
- message- a String describing the error
- sourceName- a String describing the JavaScript source where the error occured; typically a filename or URL
- line- the line number associated with the error
- lineSource- the text of the line (may be null)
- lineOffset- the offset into lineSource where problem was detected
 
 - 
runtimeErrorEvaluatorException runtimeError(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset) Creates an EvaluatorException that may be thrown.runtimeErrors, unlike errors, will always terminate the current script. - Parameters:
- message- a String describing the error
- sourceName- a String describing the JavaScript source where the error occured; typically a filename or URL
- line- the line number associated with the error
- lineSource- the text of the line (may be null)
- lineOffset- the offset into lineSource where problem was detected
- Returns:
- an EvaluatorException that will be thrown.
 
 
- 
 
-