Re:Advanced exception handling
by mtomczak on Tuesday July 13, 2010 @05:59PM
(#1512920)
I've heard this approach described as a failure continuation, and it's a good approach. It's much easier to do in a language that allows for easy creation of closures. Such a system wouldn't be impossible to construct in C++; you could create an ErrorHandlers object that is passed as the last argument of every method and contains instances of some kind of "RestartCase" object. But I cringe at the amount of boilerplate that would be required to support such an approach.
Re:Advanced exception handling
by wlievens on Wednesday July 14, 2010 @06:29AM
(#1514164)
Actually I've seen recoverable exceptions in C++, at my previous employer (ARM's Belgium office) using all sorts of creepy long jumps. It was ancient, arcane code, but it still worked - and was cross-platform.