Package com.google.javascript.jscomp
Class VerifyingErrorManager
java.lang.Object
com.google.javascript.jscomp.ThreadSafeDelegatingErrorManager
com.google.javascript.jscomp.VerifyingErrorManager
- All Implemented Interfaces:
ErrorHandler,ErrorManager
An ErrorManager that verifies expected diagnostics and reports missing or unexpected ones.
It wraps a delegate ErrorManager. Expected diagnostics (passed as regexes) are swallowed if matched. Unexpected diagnostics are passed to the delegate. At the end of compilation (when generateReport is called), any unmatched expectations are reported as errors to the delegate.
-
Constructor Summary
ConstructorsConstructorDescriptionVerifyingErrorManager(ErrorManager delegate, List<String> expectedDiagnostics) -
Method Summary
Modifier and TypeMethodDescriptionvoidWrites a report to an implementation-specific medium.voidreport(CheckLevel level, JSError error) Reports an error.Methods inherited from class com.google.javascript.jscomp.ThreadSafeDelegatingErrorManager
getErrorCount, getErrors, getTypedPercent, getWarningCount, getWarnings, hasHaltingErrors, setTypedPercent, shouldReportConformanceViolation
-
Constructor Details
-
VerifyingErrorManager
-
-
Method Details
-
report
Description copied from interface:ErrorManagerReports an error. The errors will be displayed by theErrorManager.generateReport()at the discretion of the implementation.- Specified by:
reportin interfaceErrorHandler- Specified by:
reportin interfaceErrorManager- Overrides:
reportin classThreadSafeDelegatingErrorManager- Parameters:
level- the reporting levelerror- the error to report
-
generateReport
public void generateReport()Description copied from interface:ErrorManagerWrites a report to an implementation-specific medium. The compiler calls this method after any and allErrorManager.report(com.google.javascript.jscomp.CheckLevel, com.google.javascript.jscomp.JSError)calls.- Specified by:
generateReportin interfaceErrorManager- Overrides:
generateReportin classThreadSafeDelegatingErrorManager
-