Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1424793008: Remove unused support for disabling error messages (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 01954fb903f01235a14896000efa3fb5664407a4..7920a62650a4685aa4c899b7d524ca7a810221b5 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -2476,62 +2476,6 @@ class CompileTimeErrorCode extends ErrorCode {
}
/**
- * An error listener that can be enabled or disabled while executing a function.
- */
-class DisablableErrorListener implements AnalysisErrorListener {
- /**
- * The listener to which errors will be reported if this listener is enabled.
- */
- final AnalysisErrorListener baseListener;
-
- /**
- * A flag indicating whether this listener is currently enabled.
- */
- bool enabled = true;
-
- /**
- * Initialize a newly created listener to report errors to the given
- * [baseListener].
- */
- DisablableErrorListener(this.baseListener);
-
- /**
- * Disable the processing of errors while evaluating the given [function].
- * Return the value returned by the function.
- */
- dynamic disableWhile(dynamic function()) {
- bool wasEnabled = enabled;
- try {
- enabled = false;
- return function();
- } finally {
- enabled = wasEnabled;
- }
- }
-
- /**
- * Disable the processing of errors while evaluating the given [function].
- * Return the value returned by the function.
- */
- dynamic enableWhile(dynamic function()) {
- bool wasEnabled = enabled;
- try {
- enabled = true;
- return function();
- } finally {
- enabled = wasEnabled;
- }
- }
-
- @override
- void onError(AnalysisError error) {
- if (enabled) {
- baseListener.onError(error);
- }
- }
-}
-
-/**
* An error code associated with an [AnalysisError].
*
* Generally, we want to provide messages that consist of three sentences. From
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698