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

Unified Diff: pkg/analysis_server/lib/src/domain_completion.dart

Issue 1404353007: Completion exceptions are never fatal. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domain_completion.dart
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index e5f42ae5c6b3da955a8f20eb0ee283405524fc0c..e20473263d073bf4f9d3bdde23a27b85f512866c 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -57,12 +57,12 @@ class CompletionDomainHandler implements RequestHandler {
StreamSubscription<SourcesChangedEvent> _sourcesChangedSubscription;
/**
- * Code completion peformance for the last completion operation.
+ * Code completion performance for the last completion operation.
*/
CompletionPerformance performance;
/**
- * A list of code completion peformance measurements for the latest
+ * A list of code completion performance measurements for the latest
* completion operation up to [performanceListMaxLength] measurements.
*/
final List<CompletionPerformance> performanceList =
@@ -131,15 +131,19 @@ class CompletionDomainHandler implements RequestHandler {
if (searchEngine == null) {
return new Response.noIndexGenerated(request);
}
- try {
- String requestName = request.method;
- if (requestName == COMPLETION_GET_SUGGESTIONS) {
- return processRequest(request);
+ return runZoned(() {
+ try {
+ String requestName = request.method;
+ if (requestName == COMPLETION_GET_SUGGESTIONS) {
+ return processRequest(request);
+ }
+ } on RequestFailure catch (exception) {
+ return exception.response;
}
- } on RequestFailure catch (exception) {
- return exception.response;
- }
- return null;
+ return null;
+ }, onError: (exception, stackTrace) {
+ server.sendServerErrorNotification(exception, stackTrace);
+ });
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698