Re: bug in new StatementHandler
От | Aaron Mulder |
---|---|
Тема | Re: bug in new StatementHandler |
Дата | |
Msg-id | Pine.LNX.4.44.0212121401110.11322-100000@www.princetongames.org обсуждение исходный текст |
Ответ на | bug in new StatementHandler (Mike Beachy <beachy@marketboy.com>) |
Ответы |
Re: bug in new StatementHandler
|
Список | 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 по дате отправления: