Re: [racket] try/catch/finally idiom in Racket

2011-08-12 Thread Zack Galler
Sam Phillips writes: > > Hi All, > > I understand using call-with-exception-handler/with-handlers/etc. to > catch exceptions in a block of code, but I'm at a loss to what the best > way to do a "finally" or cleanup action after a block of code. My > intuition is to use dynamic-wind, but I figu

[racket] finally via macro

2011-08-12 Thread Zack Galler
Sam Phillips writes: > > On Fri, Oct 8, 2010 at 4:40 PM, Jay McCarthy wrote: > > I use dynamic-wind for this. If there is something better, I don't > > know what it is. dynamic-wind is a little bit funny though because if > > you capture continuations then the in/out handlers can run multiple >