Re: pl/python tracebacks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jan Urbański <wulczer(at)wulczer(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pl/python tracebacks
Date: 2011-02-26 05:10:52
Message-ID: AANLkTimvwir+MSEtA8xEOfz_Wf4-3X9NpPVBVCph9n0y@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 24, 2011 at 9:03 AM, Jan Urbański <wulczer(at)wulczer(dot)org> wrote:
> On 24/02/11 14:10, Peter Eisentraut wrote:
>> On tor, 2010-12-23 at 14:56 +0100, Jan Urbański wrote:
>>> For errors originating from Python exceptions add the traceback as the
>>> message detail. The patch tries to mimick Python's traceback.py module
>>> behaviour as close as possible, icluding interleaving stack frames
>>> with source code lines in the detail message. Any Python developer
>>> should instantly recognize these kind of error reporting, it looks
>>> almost the same as an error in the interactive Python shell.
>>
>> I think the traceback should go into the CONTEXT part of the error.  The
>> context message that's already there is now redundant with the
>> traceback.
>>
>> You could even call errcontext() multiple times to build up the
>> traceback, but maybe that's not necessary.
>
> Hm, perhaps, I put it in the details, because it sounded like the place
> to put information that is not that important, but still helpful. It's
> kind of natural to think of the traceback as the detail of the error
> message. But if you prefer context, I'm fine with that. You want me to
> update the patch to put the traceback in the context?

I don't see a response to this question from Peter, but I read his
email to indicate that he was hoping you'd rework along these lines.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-02-26 05:12:36 Re: pl/python explicit subtransactions
Previous Message Robert Haas 2011-02-26 05:09:31 Re: Review: Fix snapshot taking inconsistencies