Exception handling

C. David Shaffer cdshaffer at acm.org
Fri Sep 14 16:38:53 UTC 2007


Andreas Raab wrote:
> What you are describing is pretty much the semantics of ifCurtailed:, 
> e.g.,
>
> [
>   [1/0] ensure: [Transcript show: 'ensure'; cr]
> ] ifCurtailed:[Transcript show: 'handler'; cr]
>
Yes, thanks, but maybe not quite since mine can handle specific 
exceptions and, with a slight modification to the code I supplied, it 
can provide the exception which caused the block to exit prematurely.  
ifCurtailed: is implemented as a primitive so I'm not sure how to build 
off of it to get those features.  The former feature probably isn't so 
useful since most of the time this "unwind" semantics is only needed for 
catch-all error handlers like ifCurtailed: provides.

David




More information about the Squeak-dev mailing list