patch: PSQLException cleanups & exception chaining

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема patch: PSQLException cleanups & exception chaining
Дата
Msg-id 20031202062321.GG19205@opencloud.com
обсуждение исходный текст
Список pgsql-jdbc
In this patch (gzipped to avoid the message size limit):

 - Support for 1.4-style exception chaining to PSQLException
 - Various cleanups to PSQLException (ctors, don't override where not necessary)
 - Set "vendor code" of PSQLException to the hashcode of the message key
   (this is pretty speculative but might be useful to someone for identifying
   particular exceptions irregardless of locale?)
 - Change parsing of V3 server errors to avoid a trailing newline on the
   resulting exception message.

This has been tested on JDK1.4/JDBC3 vs. a 7.3 and 7.4 server. I don't have
the resources to test other combinations but I've kept them in mind while
making the changes.

Note that PSQLException.java is removed entirely by this patch and replaced
by PSQLException.java.in (needed to support the differences in Throwable
between 1.4 and earlier revisions).

With this patch, a PSQLException built under 1.4 will store any nested
exception via initCause() instead of extracting the whole stack trace into
the exception message itself.

Also, nested exceptions are no longer considered arguments for
internationalization of exception messages. I've corrected the English
error.properties but not other translations. It should be pretty harmless
anyway -- some stray unexpanded {0} or {1} markers in the resulting
messages.

-O

Вложения

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

Предыдущее
От: ListMan
Дата:
Сообщение: Re: Problem with PGStatement.getLastOID()
Следующее
От: Oliver Jowett
Дата:
Сообщение: patch: improve exception propagation in testcases