Re: bug in new StatementHandler - Mailing list pgsql-jdbc

From Aaron Mulder
Subject Re: bug in new StatementHandler
Date
Msg-id Pine.LNX.4.44.0212121401110.11322-100000@www.princetongames.org
Whole thread Raw
In response to bug in new StatementHandler  (Mike Beachy <beachy@marketboy.com>)
Responses Re: bug in new StatementHandler  (Mike Beachy <beachy@marketboy.com>)
List pgsql-jdbc
    The patch to fix the bug looks good.

    The patch for the test could be improved.  Instead of letting the
InvocationTargetException fall through, can you revise the test patch to
catch Exception after it catches SQLException with a failure message like
"wrong type of exception thrown; expecting SQLException not "+
e.getClass().getName() or something along those lines?

Thanks,
    Aaron

On Thu, 12 Dec 2002, Mike Beachy wrote:
> 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
>


pgsql-jdbc by date:

Previous
From: Mike Beachy
Date:
Subject: bug in new StatementHandler
Next
From: Mike Beachy
Date:
Subject: Re: bug in new StatementHandler