aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-script.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-script.c')
-rw-r--r--gdb/cli/cli-script.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 010d661..2ec8bcd 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1706,18 +1706,13 @@ script_from_file (FILE *stream, const char *file)
{
read_command_file (stream);
}
- switch (e.reason)
+ if (e.reason < 0)
{
- case 0:
- break;
- case RETURN_ERROR:
/* Re-throw the error, but with the file name information
prepended. */
throw_error (e.error,
_("%s:%d: Error in sourced command file:\n%s"),
source_file_name, source_line_number, e.message);
- default:
- internal_error (__FILE__, __LINE__, _("bad reason"));
}
}