Error codes in JDBC drivers

Поиск
Список
Период
Сортировка
От Sheer El-Showk
Тема Error codes in JDBC drivers
Дата
Msg-id Pine.LNX.4.33.0104061518170.19137-100000@laudanum.saraf.com
обсуждение исходный текст
Список pgsql-jdbc
I'm using what I presume to be the only/most popular JDBC for postgres
(from http://jdbc.postgresql.org/download; the actual jar is
jdbc7.0-1.1.jar -- please let me know if there are any others) but am a
little concerned that its error reporting (via java SQL exceptions) seems
to use only strings rather then setting the exceptions error code (vendor
specific or XOPEN standard).

I need to be able to catch SQLExceptions and convert them to my own,
application specific exceptions ... I can even do this by parsing a string
(though I would rather an error code), but I don't know how to reliably
extract DB errors from the exceptions thrown by the postgres JDBC driver.

Any suggestions, references or help would be greatly appreciate.

Thanks,
Sheer


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "chris markiewicz"
Дата:
Сообщение: RE: null to zero?
Следующее
От: "Raghunath T"
Дата:
Сообщение: RE: How connect JDBC