Re: Problem with error handling - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Problem with error handling
Date
Msg-id BANLkTik29KFA-ZGARTDJGeYbBCA_Mj5=Dw@mail.gmail.com
Whole thread Raw
In response to Problem with error handling  ("Eric Snow" <esnow@verio.net>)
Responses Re: Problem with error handling  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List psycopg
On Sat, Apr 23, 2011 at 2:56 AM, Eric Snow <esnow@verio.net> wrote:

> I am guessing that the solution is one of the following:
>
> *  PQresultErrorField  should not have returned NULL

This is from the libpq, I guess we can do little about it, if not
keeping it in consideration.


> * "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.


> Regardless of the solution, thanks for your time.

Thank you for yours!


-- Daniele

psycopg by date:

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