Hacker News new | ask | show | jobs
by mtomczak 5818 days ago
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.