diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-01-14 18:55:33 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-01-14 18:55:33 +0000 |
commit | 8a076db965ba49f891b959752db7c8bb0c524688 (patch) | |
tree | 6fc269cd6f5141e52b1f098a206ac3d9cf1782d7 /gdb/exceptions.h | |
parent | bc8332bb44886d189fce38b812d6919a157af734 (diff) | |
download | gdb-8a076db965ba49f891b959752db7c8bb0c524688.zip gdb-8a076db965ba49f891b959752db7c8bb0c524688.tar.gz gdb-8a076db965ba49f891b959752db7c8bb0c524688.tar.bz2 |
2005-01-13 Andrew Cagney <cagney@gnu.org>
* mi/mi-main.c (mi_execute_command): Print the exception.
* cli/cli-interp.c (safe_execute_command): Print the exception.
* exceptions.h (exception_print): Declare.
* exceptions.c (struct catcher): Add field print_message.
(catcher_init): Add parameter print_message, store in the catcher
struct.
(print_and_throw): Only print the message when print_message.
(catch_exceptions_with_msg, catch_errors): Pass print_message=1 to
catcher_init.
(catch_exception): Pass print_message=0 to catcher_init.
Diffstat (limited to 'gdb/exceptions.h')
-rw-r--r-- | gdb/exceptions.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/exceptions.h b/gdb/exceptions.h index e062b18..919738a 100644 --- a/gdb/exceptions.h +++ b/gdb/exceptions.h @@ -65,6 +65,11 @@ struct exception /* A pre-defined non-exception. */ extern const struct exception exception_none; +/* If E is an exception, print it's error message on the specified + stream. */ +extern void exception_print (struct ui_file *file, const char *pre_print, + struct exception e); + /* Throw an exception (as described by "struct exception"). Will execute a LONG JUMP to the inner most containing exception handler established using catch_exceptions() (or similar). @@ -121,6 +126,10 @@ extern int catch_exceptions_with_msg (struct ui_out *uiout, void *func_args, char *errstring, char **gdberrmsg, return_mask mask); + +/* This function, in addition, suppresses the printing of the captured + error message. It's up to the client to print it. */ + extern struct exception catch_exception (struct ui_out *uiout, catch_exception_ftype *func, void *func_args, |