This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Go directly to jail
Feed Title: David Buck - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/buck-rss.xml
Feed Description: Smalltalk can do that
Well, it seems that .NET has the same problem as Java does with exceptions. They are non-proceedable. In other words, by the time your exception handling code runs, the stack has already been unwound and you just have a post-mortem exception object to try to explain what happened.
In Smalltalk, your exception handling code is called from the context of the method that raised the exception. At that time, it can decide what kind of error has been encountered and whether it's possible to just provide another result and continue processing. This option isn't available in .NET.
James Robertson talked about proceedable exceptions this in his blog here and here.