com.google.javascript.jscomp
Interface ErrorManager

All Superinterfaces:
ErrorHandler
All Known Implementing Classes:
AntErrorManager, BasicErrorManager, LoggerErrorManager, PrintStreamErrorManager

public interface ErrorManager
extends ErrorHandler

The error manager is in charge of storing, organizing and displaying errors and warnings generated by the compiler.


Method Summary
 void generateReport()
          Writes a report to an implementation-specific medium.
 int getErrorCount()
          Gets the number of reported errors.
 JSError[] getErrors()
          Gets all the errors.
 double getTypedPercent()
          Gets the percentage of typed expressions.
 int getWarningCount()
          Gets the number of reported warnings.
 JSError[] getWarnings()
          Gets all the warnings.
 void report(CheckLevel level, JSError error)
          Reports an error.
 void setTypedPercent(double typedPercent)
          Sets the percentage of typed expressions.
 

Method Detail

report

void report(CheckLevel level,
            JSError error)
Reports an error. The errors will be displayed by the generateReport() at the discretion of the implementation.

Specified by:
report in interface ErrorHandler
Parameters:
level - the reporting level
error - the error to report

generateReport

void generateReport()
Writes a report to an implementation-specific medium. The compiler calls this method after any and all report(com.google.javascript.jscomp.CheckLevel, com.google.javascript.jscomp.JSError) calls.


getErrorCount

int getErrorCount()
Gets the number of reported errors.


getWarningCount

int getWarningCount()
Gets the number of reported warnings.


getErrors

JSError[] getErrors()
Gets all the errors.


getWarnings

JSError[] getWarnings()
Gets all the warnings.


setTypedPercent

void setTypedPercent(double typedPercent)
Sets the percentage of typed expressions.


getTypedPercent

double getTypedPercent()
Gets the percentage of typed expressions.