Exception Identification - What to do with no codes? - Mailing list pgsql-jdbc

From Derek S
Subject Exception Identification - What to do with no codes?
Date
Msg-id 3E4D3C88.3050807@rogers.com
Whole thread Raw
Responses Re: Exception Identification - What to do with no codes?
List 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?


pgsql-jdbc by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL JDBC Drivers licensing?
Next
From: Daniel Serodio
Date:
Subject: Re: Exception Identification - What to do with no codes?