Fix an error in parse_scrolling_args
authorTom Tromey <tom@tromey.com>
Tue, 2 Jul 2019 23:31:44 +0000 (17:31 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:25 +0000 (12:19 -0600)
parse_scrolling_args combines two errors into one message, which also
happens to end with a newline.  This separates the errors and fixes
the message.

gdb/ChangeLog
2019-07-17  Tom Tromey  <tom@tromey.com>

* tui/tui-win.c (parse_scrolling_args): Throw separate errors.

gdb/ChangeLog
gdb/tui/tui-win.c

index 77a9f9e86eb02c535487da65306c9d9e4b1b5b67..aff8c75a0a9467f8bf8683622d105e44af220f8a 100644 (file)
@@ -1,3 +1,7 @@
+2019-07-17  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-win.c (parse_scrolling_args): Throw separate errors.
+
 2019-07-17  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-winsource.h (struct tui_exec_info_window)
index 1e02c42dbd135da5fcdc61cc53a0716cb44252af..db4dc1088a634bf6dda00e451bab92808a2d96d1 100644 (file)
@@ -1391,10 +1391,10 @@ parse_scrolling_args (const char *arg,
          
          *win_to_scroll = tui_partial_win_by_name (wname);
 
-         if (*win_to_scroll == NULL
-             || !(*win_to_scroll)->is_visible)
-           error (_("Invalid window specified. \n\
-The window name specified must be valid and visible.\n"));
+         if (*win_to_scroll == NULL)
+           error (_("Unrecognized window `%s'"), wname);
+         if (!(*win_to_scroll)->is_visible)
+           error (_("Window is not visible"));
          else if (*win_to_scroll == TUI_CMD_WIN)
            *win_to_scroll = tui_source_windows ()[0];
        }
This page took 0.032349 seconds and 4 git commands to generate.