From: Yukihiro Matsumoto Date: 2006-07-07T00:01:42+09:00 Subject: Re: [Bug?] Confused exception handling in Continuation Context Hi, In message "Re: [Bug?] Confused exception handling in Continuation Context" on Thu, 6 Jul 2006 21:04:25 +0900, "Robert Dober" writes: |Yes that was surprising for me too, but it was discussed before, and so |far there is nobody who pointed out why, did you BTW? |Furthermore this is not about the continuation, understanding the |continuation is not even necessary to identify the buggy behavior. |This is about the exception handling. No. It's about the continuation. I will try to explain. Your last call of i.next invokes continuation pointed by @next, that restores the execution context to the previous call of next (in the loop), then raise the exception at the point. You have to reset @next before raising exception. matz.