Index: runtime/observatory/lib/src/elements/debugger.dart |
diff --git a/runtime/observatory/lib/src/elements/debugger.dart b/runtime/observatory/lib/src/elements/debugger.dart |
index b3ca5693fd3b00e7b831eb127e6e7b95524bbda6..a2253fc034db789ab6fb4e5e0035d48e13865f73 100644 |
--- a/runtime/observatory/lib/src/elements/debugger.dart |
+++ b/runtime/observatory/lib/src/elements/debugger.dart |
@@ -1807,18 +1807,24 @@ class ObservatoryDebugger extends Debugger { |
console.printBold('\$ $command'); |
return cmd.runCommand(command).then((_) { |
lastCommand = command; |
- }).catchError((e, s) { |
- if (e is S.NetworkRpcException) { |
+ }).catchError( |
+ (e, s) { |
console.printRed('Unable to execute command because the connection ' |
- 'to the VM has been closed'); |
- } else { |
+ 'to the VM has been closed'); |
+ }, test: (e) => e is S.NetworkRpcException |
+ ).catchError( |
+ (e, s) { |
+ console.printRed(e.toString()); |
+ }, test: (e) => e is CommandException |
+ ).catchError( |
+ (e, s) { |
if (s != null) { |
console.printRed('Internal error: $e\n$s'); |
} else { |
console.printRed('Internal error: $e\n'); |
} |
} |
- }); |
+ ); |
} |
String historyPrev(String command) { |