This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Resumable Exceptions
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Blaine Buxton explains why resumable exceptions are a good thing:
Time for another "this is why Smalltalk is cool" post, but this one also holds true for Ruby And Lisp as well. So, it's a "why Smalltalk, Ruby, and Lisp kicks mucho booty" so to speak. OK, enough of the back patting and let's get down to business. Today's topic is resumable exceptions. It has a nice geeky ring to it doesn't it? The first thing you might ask yourself is, "Why in the world would I want to resume an exception? It's an exception! Dead programs tell no tales!" True, true. Normally, you want an exception to send your program down in flames because you had a mechanical glitch that you didn't expect. Better stop everything before the propeller goes slashing through your data unkindly! But, what if we had exceptions that were good that could notify us of potential bad things or even enumerate potential bad things?
I use resumable exceptions quite a bit in BottomFeeder - they allowed me to create a customized RSS/Atom handler that could deal with many of the trivial issues in feeds (like bad characters) without having to create more own "tag soup" parser. The lack of them in the maintream languages (Java, C++, C#) explains why every time I bring this up in a forum with people involved in the syndication space, they assume that I had to roll my own regex based tag soup parser. But hey - all those extra libraries must be making them more productive... somehow.