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

Unified Diff: runtime/bin/vmservice/client/lib/src/app/application.dart

Issue 205713004: Add isolate tag-profile and better handling of errors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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: runtime/bin/vmservice/client/lib/src/app/application.dart
diff --git a/runtime/bin/vmservice/client/lib/src/app/application.dart b/runtime/bin/vmservice/client/lib/src/app/application.dart
index 9b593cbf8af30d1d882f86a3926f072bad4d78a8..3ebdc7b4c57f1a42529b85fc0092fe88e5a93e8d 100644
--- a/runtime/bin/vmservice/client/lib/src/app/application.dart
+++ b/runtime/bin/vmservice/client/lib/src/app/application.dart
@@ -26,6 +26,20 @@ class ObservatoryApplication extends Observable {
assert(locationManager._app == null);
locationManager._app = this;
locationManager.init();
+ vm.errors.stream.listen(_onError);
+ vm.exceptions.stream.listen(_onException);
+ }
+
+ void _onError(ServiceError error) {
+ response = error;
+ // No id, clear the hash.
+ locationManager.clearCurrentHash();
+ }
+
+ void _onException(ServiceException exception) {
+ response = exception;
+ // No id, clear the hash.
+ locationManager.clearCurrentHash();
}
ObservatoryApplication.devtools() :
« no previous file with comments | « runtime/bin/vmservice/client/lib/service_html.dart ('k') | runtime/bin/vmservice/client/lib/src/app/chart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698