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

Unified Diff: pkg/analyzer/lib/src/task/general.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/task/dart.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/general.dart
diff --git a/pkg/analyzer/lib/src/task/general.dart b/pkg/analyzer/lib/src/task/general.dart
index 69a808ee386bb7f1a377e5617f286c72f5284764..d7a56a3026ab7f451a1f67537e30838227fb5275 100644
--- a/pkg/analyzer/lib/src/task/general.dart
+++ b/pkg/analyzer/lib/src/task/general.dart
@@ -38,9 +38,9 @@ class GetContentTask extends SourceBasedAnalysisTask {
TimestampedData<String> data = context.getContents(source);
outputs[CONTENT] = data.data;
outputs[MODIFICATION_TIME] = data.modificationTime;
- } catch (exception, stackTrace) {
- throw new AnalysisException('Could not get contents of $source',
- new CaughtException(exception, stackTrace));
+ } catch (exception) {
+ outputs[CONTENT] = '';
+ outputs[MODIFICATION_TIME] = -1;
}
}
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698