bug in new StatementHandler

From: Mike Beachy <beachy(at)marketboy(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Cc: ammulder(at)alumni(dot)princeton(dot)edu
Subject: bug in new StatementHandler
Date: 2002-12-12 18:47:00
Message-ID: 20021212184700.GC7805@marketdude.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


There's a problem in how exceptions are handled (or rather, not handled)
in the new StatementHandler. If an SQLException is thrown in one of the
Statement methods, java.lang.reflect.Method catches it and throws it as
an InvocationTargetException. The handler needs to catch this and
extract the underlying exception.

A test for this problem and a patch are attached.

The same problem seems to exist for the ConnectionHandler, so I
implemented the code there as well. Aaron, if you could double check
what I've done that'd be cool.

Thanks.

Mike

Attachment Content-Type Size
tmp.patch text/plain 3.1 KB

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Aaron Mulder 2002-12-12 19:06:05 Re: bug in new StatementHandler
Previous Message Kris Jurka 2002-12-11 21:45:41 Re: updatable (J2EE) resultsets