Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
mac os x 10.3.4
Description
In an effort to create a construct to allow breaking from a closure-based iterator, I ran into this problem. Here is the code:
class MyException extends Exception {}
break_closure =
{ throw new MyException() }breakable = {
try
catch(MyException e)
{ println "got my exception!" }}
list = [1,2,-1,3]
breakable {
list.each
}
This bombs with an InvokerInvocationException. I would have assumed that the exception I threw would get propogated upward, but instead it gets transformed into a different exception along the way.