Re: try/catch macros for Postgres backend - Mailing list pgsql-hackers

From Jeroen T. Vermeulen
Subject Re: try/catch macros for Postgres backend
Date
Msg-id 20040729141049.GB84485@xs4all.nl
Whole thread Raw
In response to Re: try/catch macros for Postgres backend  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: try/catch macros for Postgres backend
Next
From: Tom Lane
Date:
Subject: Re: more signals (was: Function to kill backend)