Hi Erik,

Thank you. You were so right.

I've added your suggested catch(JDOException) and improved the JDOHelperTest to check for the proper nested exception. The original test only checked the outer exception which is correct, but the real problem is in the nested exception.

Thanks for being persistent on this issue.

Craig

Attachment: jdohelpertest.patch
Description: Binary data


On Jul 17, 2005, at 2:01 AM, [EMAIL PROTECTED] wrote:

Quoting Craig Russell <[EMAIL PROTECTED]>:


This exception is not thrown by Method.invoke. It will be caught by
the catch (InvocationTargetException). Reflective invocation wraps
all exceptions in InvocationTargetException which we then unwrap and
rethrow JDOExceptions.

I've added a new test case in JDOHelperTest to test that a
JDOException thrown from getPersistenceManagerFactory will be thrown
to the user.



When the mapGetMethodException is thrown, it is inside the try catch block
catching java.lang.Exception. The JDOException catch there fixes it.



Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:[EMAIL PROTECTED]

P.S. A good JDO? O, Gasp!


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to