Index: pkg/analyzer/lib/src/dart/analysis/driver.dart |
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart |
index 7e923024015fde3f256eb2ea3ed6fdd776a37e52..46a4056b7eae0cbfb882e9fbb2eb913057c62d50 100644 |
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart |
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart |
@@ -1164,7 +1164,9 @@ class AnalysisDriver { |
String _storeExceptionContext( |
String path, FileState libraryFile, exception, StackTrace stackTrace) { |
- if (allowedNumberOfContextsToWrite > 0) { |
+ if (allowedNumberOfContextsToWrite <= 0) { |
+ return null; |
+ } else { |
allowedNumberOfContextsToWrite--; |
} |
try { |