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

Unified Diff: runtime/observatory/lib/src/elements/action_link.dart

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests 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: runtime/observatory/lib/src/elements/action_link.dart
diff --git a/runtime/observatory/lib/src/elements/action_link.dart b/runtime/observatory/lib/src/elements/action_link.dart
index 74cc4902af49b301e47151fb835fa97e057d2cc9..63b941e1dd1c9566f1dc6882e43210022f043f4b 100644
--- a/runtime/observatory/lib/src/elements/action_link.dart
+++ b/runtime/observatory/lib/src/elements/action_link.dart
@@ -4,10 +4,11 @@
library action_link_element;
+import 'observatory_element.dart';
import 'package:polymer/polymer.dart';
@CustomTag('action-link')
-class ActionLinkElement extends PolymerElement {
+class ActionLinkElement extends ObservatoryElement {
ActionLinkElement.created() : super.created();
@observable bool busy = false;
@@ -21,9 +22,9 @@ class ActionLinkElement extends PolymerElement {
}
if (callback != null) {
busy = true;
- // TODO(turnidge): Track down why adding a dummy argument makes
- // this work but having a no-argument callback doesn't.
- callback(null).whenComplete(() {
+ callback()
+ .catchError(app.handleException)
+ .whenComplete(() {
busy = false;
});
}
« no previous file with comments | « runtime/observatory/lib/src/app/location_manager.dart ('k') | runtime/observatory/lib/src/elements/action_link.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698