Re: try/catch macros for Postgres backend

Поиск
Список
Период
Сортировка
От Jeroen T. Vermeulen
Тема Re: try/catch macros for Postgres backend
Дата
Msg-id 20040729141049.GB84485@xs4all.nl
обсуждение исходный текст
Ответ на Re: try/catch macros for Postgres backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Jul 29, 2004 at 09:58:54AM -0400, Tom Lane wrote:
> Right.  The last bit (FINALLY executes whether or not a CATCH block
> re-throws) seemed too messy to handle in my little macros, so I'm
> planning on leaving it out.  But I'm open to the idea if anyone has
> a clever implementation thought.

There's also the alternative of going to C++, of course, which would
give you full native exception handling.  Most of this "finally" stuff
will go away when you have destructors, IMHO, and resource cleanups are
a whole lot easier.  The main drawback is that stricter rules apply to
gotos and longjumps--but most of those will be "a poor man's exception
handling" anyway.


Jeroen



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: try/catch macros for Postgres backend
Следующее
От: Tom Lane
Дата:
Сообщение: Re: more signals (was: Function to kill backend)