misleading Exception handling

Поиск
Список
Период
Сортировка
От Michael Adler
Тема misleading Exception handling
Дата
Msg-id Pine.NEB.4.44.0212131320380.19675-200000@reva.sixgirls.org
обсуждение исходный текст
Ответ на Re: getColumnLabel return value  (Dave Cramer <Dave@micro-automation.net>)
Список pgsql-jdbc
I'm using the JDBC over a modem link and I regularly experience
SocketExceptions as a result of the flakey nature of the connection. The
driver can't be held responsible for unreliable sub-levels but the
Exception handling could be more clear.

Currently the driver prints out a stack trace of the original IOException
with unspecific descriptions and then throws a PSQLException. It's not
obvious where the stack trace comes from.

I know you're thinking "he's dumb enough to use a JDBC connection over a
modem link, of course this would confuse him". Still, the behavior could
be more informative. I've attached a patch that might improve that. You
can probably conceive a better phrasing.

Also, is there a standard way to decipher fatal and non-fatal errors
thrown by the driver? Would java.sql.Connection.isClosed() work?

Thanks,
Mike Adler


Вложения

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

Предыдущее
От: "Gerlits András"
Дата:
Сообщение: Re: getColumnLabel return value
Следующее
От: per.sil@gmx.it
Дата:
Сообщение: failing using unicode