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

From Alvaro Herrera Munoz
Subject Re: try/catch macros for Postgres backend
Date
Msg-id 20040729041012.GA4657@dcc.uchile.cl
Whole thread Raw
In response to try/catch macros for Postgres backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: try/catch macros for Postgres backend  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
List pgsql-hackers
On Wed, Jul 28, 2004 at 08:19:17PM -0400, Tom Lane wrote:

Very cool and interesting idea.

> Does anyone have a problem with this macro syntax?  The try/catch names
> are stolen from Java, so I'm figuring they won't terribly surprise any
> modern programmer, but I'm open to different names if anyone has a
> better idea.

The only comment I have so far is that Java and Python appear to have
settled on try/catch/finally blocks.  Maybe we need three blocks too,
for handling more complex scenarios.

(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?)

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"No es bueno caminar con un hombre muerto"


pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: try/catch macros for Postgres backend
Next
From: Coloring Graph
Date:
Subject: 7.5 devel initdb failure