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

Unified Diff: runtime/observatory/lib/src/elements/script_inset.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: 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/script_inset.dart
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
index 164c134a0b654b689b710d3a2a2736148faec24e..17c110db290cd24f8f3a2a4301798d267287bf42 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -459,7 +459,10 @@ class ScriptInsetElement extends ObservatoryElement {
e.classes.clear();
e.classes.add('noCopy');
- if (busy) {
+ if (!line.possibleBpt) {
+ e.classes.add("emptyBreakpoint");
+ e.text = nbsp;
+ } else if (busy) {
e.classes.add("busyBreakpoint");
} else {
if (line.breakpoints != null) {
@@ -484,6 +487,15 @@ class ScriptInsetElement extends ObservatoryElement {
line.script.isolate.addBreakpoint(line.script, line.line).then((_) {
busy = false;
update();
+ }).catchError((e, st) {
+ bool suppressError = false;
+ if (e is ServerRpcException) {
+ ServerRpcException se = e;
+ suppressError = (se.code == ServerRpcException.kNoBreakAtLine);
+ }
+ if (!suppressError) {
+ return new Future.error(e, st);
Cutch 2015/05/13 17:50:09 Maybe cleaner as: if (e is ServiceRpcException &&
turnidge 2015/05/14 17:53:43 Rewritten.
+ }
});
} else {
// Existing breakpoint. Remove it.

Powered by Google App Engine
This is Rietveld 408576698