Re: jdbc excpetions in pg
От | Kris Jurka |
---|---|
Тема | Re: jdbc excpetions in pg |
Дата | |
Msg-id | alpine.BSO.2.00.0906031617300.2432@leary.csoft.net обсуждение исходный текст |
Ответ на | jdbc excpetions in pg ("Thomas Finneid" <tfinneid@fcon.no>) |
Ответы |
Re: jdbc excpetions in pg
|
Список | pgsql-jdbc |
On Wed, 3 Jun 2009, Thomas Finneid wrote: > I was looking at the documentation for the pg jdbc driver and it seems to > me that the driver throws SQLExceptions only, or mostly. I.e. the driver > does not create any subclasses of the SQLException class. Is this correct? Yes. The JDBC4 spec has created subclasses of SQLException to indicate different failure modes, but the pg driver has not implemented that yet. > If so, what is the suggested method for classifying the errors to more > detail than SQLException? I was hoping to make my code more robust by > dealing with the errors more appropriately. You should check the SQLState of the SQLException to determine the type of problem encountered. Kris Jurka
В списке pgsql-jdbc по дате отправления: