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

Unified Diff: pkg/analysis_server/lib/src/services/index/index_contributor.dart

Issue 1168473003: Issue 23573. Catch exception during indexing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Clean index information for the current Dart unit on exception. 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
Index: pkg/analysis_server/lib/src/services/index/index_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/index/index_contributor.dart b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
index 01433754b56a61f67d9a0f11e9755e983d454ac0..53ef4643de0866f62992588f869869d37d7558bf 100644
--- a/pkg/analysis_server/lib/src/services/index/index_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
@@ -40,8 +40,13 @@ void indexDartUnit(
return;
}
// do index
- unit.accept(new _IndexContributor(store));
- store.doneIndex();
+ try {
+ unit.accept(new _IndexContributor(store));
+ store.doneIndex();
+ } catch (e) {
+ store.cancelIndexDart();
+ rethrow;
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698