Re: pgAdmin III commit: Revert the previous change that introduced sysSetti

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: pgAdmin III commit: Revert the previous change that introduced sysSetti
Дата
Msg-id AANLkTikFAPXBH6BnRJ5O356uoT3iE1sY9Q6JHwdkm5dW@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgAdmin III commit: Revert the previous change that introduced sysSetti  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
Список pgadmin-hackers
On Fri, Feb 18, 2011 at 2:50 PM, Peter Geoghegan
<peter.geoghegan86@gmail.com> wrote:
> Uh, it just occurred to me that without exceptions, there is no
> compelling way to report a failure from Read() variants. Qt does
> things like returning default constructed variables, that have values
> of 0 in the event of a failure. What do you think of that? Failures
> presumably more or less never occur with Read() overloads as things
> stand.

We generally do the same (the Read() functions tend to take a third
parameter containing the default value to return). But, returning an
error isn't a problem - we pass the value we read back in a reference
passed as a parameter, and can return true or false to indicate error
or success.


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: pgAdmin III commit: Revert the previous change that introduced sysSetti
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: pgAdmin III commit: Revert the previous change that introduced sysSetti