From: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
---|---|
To: | Eric Snow <esnow(at)verio(dot)net> |
Cc: | psycopg(at)postgresql(dot)org |
Subject: | Re: Problem with error handling |
Date: | 2011-04-24 02:07:15 |
Message-ID: | BANLkTik3tvFdAKHP8KkLr-9+_h4q9vfubw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
On Sun, Apr 24, 2011 at 2:47 AM, Daniele Varrazzo
<daniele(dot)varrazzo(at)gmail(dot)com> wrote:
> On Sat, Apr 23, 2011 at 2:56 AM, Eric Snow <esnow(at)verio(dot)net> wrote:
>> * "exc" should have been calculated another way (like an else after the
>> "if (code != NULL)")
>
> Definitely there should have been an else here: We check for the state
> not null but then don't do anything as an alternative. I don't think
> passing a NULL to psyco_set_error was ever intentional. Fixing in my
> repos.
I have fixed the issue
<https://github.com/dvarrazzo/psycopg/commit/c08799b0>, but the error
may be unhelpful if the libpq didn't provide a message either.
Do you have a way to reproduce the bug so we can see if there is any
other hint we can provide as exception message? If not, would you mind
testing the patch and see if you get a reasonable error?
Thanks,
-- Daniele
From | Date | Subject | |
---|---|---|---|
Next Message | Eric Snow | 2011-04-25 17:20:38 | Re: Problem with error handling |
Previous Message | Daniele Varrazzo | 2011-04-24 01:47:55 | Re: Problem with error handling |