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

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

Issue 166703004: Use Future for error handling (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | 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/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 1c5e683eb1240fac54b9ae076ee9ee7067311a0a..90fca909b11d5cacd3aeaf0c624dce3a4fcb97fa 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -136,8 +136,8 @@ class AnalysisServer {
if (contextWorkQueue.isEmpty) {
running = false;
} else {
- Timer.run(() {
- performTask();
+ new Future(performTask).catchError((exception, stackTrace) {
devoncarew 2014/02/18 17:15:21 Does performTask() throw? I think that's the only
Brian Wilkerson 2014/02/18 17:18:38 Not if it's working as expected, but an exception
+ AnalysisEngine.instance.logger.logError3(exception);
});
}
}
« 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