This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Consolidate gdb.GdbError handling


*** TEST RESULTS FOR COMMIT 2b4ad2fe4300489fd40dbe07e1675ff1cf0bee58 ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 2b4ad2fe4300489fd40dbe07e1675ff1cf0bee58

Consolidate gdb.GdbError handling

I noticed two nearly identical copies of the same code for handling
gdb.GdbError.  The only differences were in some error messages.
These differences didn't seem very important, so this patch pulls the
code out into a new function.

2018-09-23  Tom Tromey  <tom@tromey.com>

	* python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
	* python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
	* python/python-internal.h (gdbpy_handle_exception): Declare.
	* python/py-utils.c (gdbpy_handle_exception): New function.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]