Index: pkg/analyzer/lib/src/generated/engine.dart |
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart |
index e4fcdeb9822560d473a37dbd75af6bc2ba5020c8..9560bfffe534803666e3d3fd4d6b5c862e3da6f5 100644 |
--- a/pkg/analyzer/lib/src/generated/engine.dart |
+++ b/pkg/analyzer/lib/src/generated/engine.dart |
@@ -8773,8 +8773,10 @@ class GetContentTask extends AnalysisTask { |
AnalysisEngine.instance.instrumentationService |
.logFileRead(source.fullName, _modificationTime, _content); |
} catch (exception, stackTrace) { |
- errors.add(new AnalysisError( |
- source, 0, 0, ScannerErrorCode.UNABLE_GET_CONTENT, [exception])); |
+ if (source.exists()) { |
+ errors.add(new AnalysisError( |
+ source, 0, 0, ScannerErrorCode.UNABLE_GET_CONTENT, [exception])); |
+ } |
throw new AnalysisException("Could not get contents of $source", |
new CaughtException(exception, stackTrace)); |
} |