From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Doug Evans <dje@google.com>
Cc: Keith Seitz <keiths@redhat.com>,
GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix Python completion when using the "complete" command
Date: Wed, 08 Apr 2015 22:29:00 -0000 [thread overview]
Message-ID: <87wq1mz22z.fsf@redhat.com> (raw)
In-Reply-To: <21797.37361.185090.321060@ruffy2.mtv.corp.google.com> (Doug Evans's message of "Wed, 8 Apr 2015 13:39:13 -0700")
On Wednesday, April 08 2015, Doug Evans wrote:
> > + resultobj = PyObject_CallMethodObjArgs ((PyObject *) obj, complete_cst,
> > + textobj, wordobj, NULL);
> > + Py_DECREF (textobj);
> > + Py_DECREF (wordobj);
> > + if (!resultobj)
> > + {
> > + /* Just swallow errors here. */
> > + PyErr_Clear ();
> > }
>
> I realize this is just copying the previous code,
> but does swallowing errors here make it hard to debug problems
> in the completer function?
> Is this something we want to address in a future patch?
Thanks for the review, Doug.
You have a valid point: swallowing errors in this part of the code does
make it hard to debug problems in the user-provided completer
functions. And a small hack in the code proved me that it should be
fairly easy to print the error instead, just like cmdpy_function already
does. I will see if I can prepare a patch to do that.
Meanwhile, I pushed the current patch upstream.
<https://sourceware.org/ml/gdb-cvs/2015-04/msg00062.html>
6d62641c832525382336c1b04731d85cb6c398e7
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
prev parent reply other threads:[~2015-04-08 22:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 23:10 Sergio Durigan Junior
2015-04-01 2:07 ` Sergio Durigan Junior
2015-04-07 19:13 ` Sergio Durigan Junior
2015-04-08 18:50 ` Keith Seitz
2015-04-08 19:59 ` Sergio Durigan Junior
2015-04-08 20:39 ` Doug Evans
2015-04-08 22:29 ` Sergio Durigan Junior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wq1mz22z.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox