From: Brent Roman Date: 2008-02-10T08:39:49+09:00 Subject: Re: Restartable Exceptions (was: Re: Timeout::Error) I think a "restartable" Exception could be implemented by creating an Exception with an instance variable that holds a Continuation. The Continuation would assigned when the Exception was created such that when .call'd it resumed (or restarted) execution at the desired point. It would be the responibility of the code that initially threw the restartable exception to set up the Continuation properly. I believe no new formalisms would be required to implement this. However, Continuations are quite expensive. Would you want *all* Exceptions to be resumable in this way? - brent Martin Duerst wrote: > > At 09:37 08/02/07, Kurt Stephens wrote: > >>P.S.: Restartable exceptions would be a great feature for Ruby. > > Yes indeed. One place where they might help is for code conversion. > Currently, if Ruby tries to process (e.g. concatenate) two strings > with different encodings, it throws an exception. Wherever the > exception is caught, it's usually too late to fix anything. > > Regards, Martin. > > > #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University > #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp > > > > -- View this message in context: http://www.nabble.com/Timeout%3A%3AError-tp15291110p15391530.html Sent from the ruby-core mailing list archive at Nabble.com.