From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122817 invoked by alias); 8 Apr 2015 22:29:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 122804 invoked by uid 89); 8 Apr 2015 22:29:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 08 Apr 2015 22:29:13 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t38MTAfx015406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 8 Apr 2015 18:29:11 -0400 Received: from localhost (unused-10-15-17-126.yyz.redhat.com [10.15.17.126]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t38MT971027265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO); Wed, 8 Apr 2015 18:29:10 -0400 From: Sergio Durigan Junior To: Doug Evans Cc: Keith Seitz , GDB Patches Subject: Re: [PATCH] Fix Python completion when using the "complete" command References: <87d23ovk55.fsf@redhat.com> <87ego4txco.fsf@redhat.com> <87vbh74uqd.fsf@redhat.com> <55257877.3040604@redhat.com> <87384a1jeo.fsf@redhat.com> <21797.37361.185090.321060@ruffy2.mtv.corp.google.com> X-URL: http://blog.sergiodj.net Date: Wed, 08 Apr 2015 22:29:00 -0000 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") Message-ID: <87wq1mz22z.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00310.txt.bz2 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. 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/