Exception-handling

From: Håkan Jacobsson <hakan(dot)jacobsson99(at)bredband(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Exception-handling
Date: 2006-12-21 10:01:21
Message-ID: 20061221100121.EJOZ10325.mxfep02.bredband.com@mxfep02
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I'm working against a postgresql database (version 8.0 ).
I was wondering how to handle exceptions properly when doing
database-related stuff, like queries, inserts etc.

Often when I get an exception (I just catch an SQL exception in the catch
clause) I get a message saying call getNextException(). Should I always add
this code in the catch clause? Or should I always add a catch for catching
postgresql-exceptions? Is there a general rule for this?

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2006-12-21 14:54:35 Re: Exception-handling
Previous Message Didier BRETIN 2006-12-21 10:00:48 ant specif task for pg_dump and pg_restore