misleading Exception handling - Mailing list pgsql-jdbc

From Michael Adler
Subject misleading Exception handling
Date
Msg-id Pine.NEB.4.44.0212131320380.19675-200000@reva.sixgirls.org
Whole thread Raw
In response to Re: getColumnLabel return value  (Dave Cramer <Dave@micro-automation.net>)
List 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


Attachment

pgsql-jdbc by date:

Previous
From: "Gerlits András"
Date:
Subject: Re: getColumnLabel return value
Next
From: per.sil@gmx.it
Date:
Subject: failing using unicode