Closed GoogleCodeExporter closed 9 years ago
I think I should give some explanations here:
try {
value = loader.load(key);
} catch (NotFoundException e) { // the exception is wrapped by
InvokerInvocationException, so it cannot be caught here
value = null;
}
Original comment by JohnnyJianHY
on 16 Jan 2009 at 12:06
I am having trouble to reproduce the problem here. For some reason the test
fail for
me on the line:
loader.load("key").raises(NotFoundException)
Which doesn't really make sense for me. Could you send me a patch for the
problem?
Why do you think the exception would be wrap by a InvokerInvocationException?
And do
you think we should delay the release until we fix this issue?
Original comment by julien.g...@gmail.com
on 17 Jan 2009 at 6:26
I know what the problem is. Try this:
try {
value = loader.load(key);
} catch (Exception e) {
System.out.println(e.getClass()); // you will find it is an
InvokerInvocationException
}
Seems that is a bug of groovy which gives a bad message.
Original comment by JohnnyJianHY
on 18 Jan 2009 at 8:19
I have fixed the bug and uploaded to the repository. Please have a look.
Original comment by JohnnyJianHY
on 18 Jan 2009 at 3:58
Well done! I had a quick look at your changes and you seems to have modify the
way
groovy interception work. Was that the issue?
Original comment by julien.g...@gmail.com
on 19 Jan 2009 at 8:10
You are right. You can see that I have rewritten the interceptors in Java, but
I just
found it is a bug of groovy while casting a closure to an interface, and the
wrapping
and unwrapping of exceptions isn't handled correctly.
Original comment by JohnnyJianHY
on 19 Jan 2009 at 9:25
Original issue reported on code.google.com by
JohnnyJianHY
on 13 Jan 2009 at 4:52