Re: try/catch macros for Postgres backend

Поиск
Список
Период
Сортировка
От Jeroen T. Vermeulen
Тема Re: try/catch macros for Postgres backend
Дата
Msg-id 20040729115623.GB71508@xs4all.nl
обсуждение исходный текст
Ответ на Re: try/catch macros for Postgres backend  (Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>)
Ответы Re: try/catch macros for Postgres backend
Список pgsql-hackers
On Thu, Jul 29, 2004 at 12:10:12AM -0400, Alvaro Herrera Munoz wrote:
> (The "finally" block, AFAIU, is executed whether an exception was raised
> or not, so it serves as cleanup for try and catch blocks.  Somebody more
> knowledgeable in this OO matters may enlighten us better?)

...Or I could try.  Yes, the "finally" block is executed after executing
the "catch" block if an exception was caught, or when leaving the "try"
block if there wasn't.  That includes both normal completion and uncaught
exceptions.

This is useful for cleanup stuff, as you say--mostly because Java doesn't
have C++'s destructors to take the cleanup out of your hands.


Jeroen



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

Предыдущее
От: Hans-Jürgen Schönig
Дата:
Сообщение: Re: storage engine , mysql syntax CREATE TABLE t (i INT)
Следующее
От: LISTMAN
Дата:
Сообщение: Undefined symbol in plpgsql.so library