Exception Identification - What to do with no codes?

From: Derek S <cube-soft(at)rogers(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Exception Identification - What to do with no codes?
Date: 2003-02-14 18:59:20
Message-ID: 3E4D3C88.3050807@rogers.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I've pored over the archives for this list, and as much documentation as
I've been able to find and I understand that the back end needs to be
updated before SQLException can be properly implemented in the JDBC
driver with failure identification codes.

I'm writing a fairly large application where certain causes of
SQLExceptions are fatal to their particular transaction, but not fatal
to the application itself. Particularly, exceptions like duplicate key
insertion failures and such will need to be reported to the user using
friendly messages and dialog boxes.

So my question is, with all of us living in this pre-error-code age, how
are people typically building useful error messages for their users? I
can't very well expect a user to know that the product code they've
entered is already taken from a message like "Cannot insert a duplicate
key into unique index product_unique_code". Is there an established
practice that people use to handle this sort of thing that won't break
if the user changes the localization settings on the server and/or client?

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Daniel Serodio 2003-02-14 19:52:47 Re: Exception Identification - What to do with no codes?
Previous Message Bruce Momjian 2003-02-14 18:33:44 Re: PostgreSQL JDBC Drivers licensing?