db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Russell <Craig.Russ...@Sun.COM>
Subject Re: JDOHelper patch
Date Sun, 17 Jul 2005 21:19:18 GMT
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


On Jul 17, 2005, at 2:01 AM, erik@jpox.org wrote:

> Quoting Craig Russell <Craig.Russell@Sun.COM>:
>
>
>> 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:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message