From: Christopher Armstrong Date: 2003-07-27T10:53:42+09:00 Subject: Throwing exceptions into continuations. Hi all. I'm playing around with Ruby because I like experimenting with concurrency systems, and found out it has continuations. I'm going to be calling user-defined code inside of a callcc block, and the user-defined code will either return a value or raise an error, and I want that value or error to be passed on to the continuation. I can't find any way to throw into the continuation. If there is no way, can I request that a #throw method be added, or something like that? The only alternative I could think of is to have special code on the calling side of the callcc that will watch the return value to see if it is a array of two elements, the first being :special-internal-throw-exception-bit, and if so, throwing the second element of the array. This isn't what I want, though, especially because it won't maintain the stack trace from the other side. -- Twisted | Christopher Armstrong: International Man of Twistery Radix | Release Manager, Twisted Project ---------+ http://twistedmatrix.com/users/radix.twistd/