Package com.google.javascript.rhino

# Interface ErrorReporter

All Known Implementing Classes:
  `SimpleErrorReporter`, `TestErrorReporter`

public interface ErrorReporter
This is interface defines a protocol for the reporting of errors during JavaScript translation or execution.

## Method Summary

Modifier and Type
Method
Description
`void`
`error(String message, String sourceName, int line, int lineOffset)`
Report an error.
`void`
`warning(String message, String sourceName, int line, int lineOffset)`
Report a warning.

## Method Details

### warning

void warning(String message, String sourceName, int line, 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 occurred; typically a filename or URL
  `line` - the line number associated with the warning
  `lineOffset` - the offset into lineSource where problem was detected

### error

void error(String message, String sourceName, int line, 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 occurred; typically a filename or URL
  `line` - the line number associated with the error
  `lineOffset` - the offset into lineSource where problem was detected