Re: Problem with error handling - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Problem with error handling
Date
Msg-id BANLkTik3tvFdAKHP8KkLr-9+_h4q9vfubw@mail.gmail.com
Whole thread Raw
In response to Re: Problem with error handling  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Responses Re: Problem with error handling  ("Eric Snow" <esnow@verio.net>)
List psycopg
On Sun, Apr 24, 2011 at 2:47 AM, Daniele Varrazzo
<daniele.varrazzo@gmail.com> wrote:
> On Sat, Apr 23, 2011 at 2:56 AM, Eric Snow <esnow@verio.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

psycopg by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: Problem with error handling
Next
From: "Eric Snow"
Date:
Subject: Re: Problem with error handling