This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3] gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL. Added notion on possible exception thrown from symbol object .value() method
- From: Maxim Bublis <satori at yandex-team dot ru>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 5 Mar 2014 17:34:44 +0400
- Subject: Re: [PATCH 3/3] gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL. Added notion on possible exception thrown from symbol object .value() method
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtpcorp4.mail.yandex.net; dkim=pass header dot i= at yandex-team dot ru
- References: <1393929360-31299-1-git-send-email-satori at yandex-team dot ru> <1393929360-31299-4-git-send-email-satori at yandex-team dot ru> <83eh2hsy77 dot fsf at gnu dot org>
Hi
> I have a question regarding the last part: is it wise to throw an
> exception when a symbol has no value? how about returning None
> instead?
There is already implemented similar behavior for LOC_TYPEDEF, it raises TypeError exception, I think there is no good reason to break current API.