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

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

Issue 909373003: Report an error on Dart Source reading exception. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/scanner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 abac83f3badd07d75f466e6cb2b971ffc1f11dd6..3ee660d93f2cc45b61a6816cc6221ae9b1ac4c1a 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -4684,6 +4684,16 @@ class AnalysisContextImpl implements InternalAnalysisContext {
CaughtException thrownException = task.exception;
if (thrownException != null) {
sourceEntry.recordContentError(thrownException);
+ // TODO(scheglov) should we add separate ContentErrorCode and
+ // SourceEntry.CONTENT_ERRORS entry?
+ if (sourceEntry is DartEntry) {
Brian Wilkerson 2015/02/11 00:49:09 We probably shouldn't limit this to only Dart file
+ sourceEntry.setValue(
+ DartEntry.SCAN_ERRORS,
+ <AnalysisError>[
+ new AnalysisError.con1(source, ScannerErrorCode.UNABLE_GET_CONTENT)]);
scheglov 2015/02/10 23:26:14 Would it be better to create the error in GetConte
Brian Wilkerson 2015/02/11 00:49:10 Probably, but we might want to wait for the task m
+ ChangeNoticeImpl notice = _getNotice(source);
+ notice.setErrors(sourceEntry.allErrors, null);
+ }
_workManager.remove(source);
throw new AnalysisException('<rethrow>', thrownException);
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698