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

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

Issue 2552783003: Better reporting of ambiguous and "not found" commands in Obs debugger. (Closed)
Patch Set: Better reporting of ambiguous and "not found" commands in Obs debugger. Created 3 years, 11 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/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) {
« no previous file with comments | « runtime/observatory/lib/src/cli/command.dart ('k') | runtime/observatory/lib/src/elements/sample_buffer_control.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698