Re: Throw error and ErrorContext question.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Throw error and ErrorContext question.
Дата
Msg-id 11619.1194477887@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Throw error and ErrorContext question.  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Ответы Re: Throw error and ErrorContext question.  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Список pgsql-hackers
"Gevik Babakhani" <pgdev@xs4all.nl> writes:
> I am trying to catch and copy an error to be re-thrown later.

This is certainly not the right way to go about solving your problem.
If you need to refactor some of the column lookup routines to make
this patch work, then do so, but don't try to make an already-thrown
error not be an error.  (One good reason for that is that you don't
really know what error you are catching --- it might be a report
of some low-level problem such as out-of-memory, for instance.)

The pattern you might want to follow is adding a noError boolean
parameter to functions you want to be able to get failure returns
back from.
        regards, tom lane


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

Предыдущее
От: CaT
Дата:
Сообщение: Feature Request: inline comments
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Feature Request: inline comments