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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1127403004: Return empty contents for not existing sources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 7054910d2b3eefa4d22966123d17ffc604fae0ff..bba412cdb0acd7cb53053b0a183958aeedb3a378 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1025,6 +1025,12 @@ class AnalysisContextImpl implements InternalAnalysisContext {
if (!AnalysisEngine.isDartFileName(source.shortName)) {
return null;
}
+ try {
+ getContents(source);
+ } catch (exception, stackTrace) {
+ throw new AnalysisException('Could not get contents of $source',
+ new CaughtException(exception, stackTrace));
+ }
return _computeResult(source, PARSED_UNIT);
}
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698