vishnu wrote:
Yes but the guy who created Cedar Mesa exceptions said, at the C++ standardization meeting in 1991, “termination is preferred over resumption; this is not a matter of opinion but a matter of years of experience. Resumption is seductive, but not valid.”
I didn't say the people behind it were necessarily in the right ballpark.
What you're quoting shows a very serious confusion about what an exception system is for (which Stroustrop unfortunately labored under also): all it is, is a control transfer mechanism. It is sometimes convenient to use the exception system for error handling, but that really has nothing to do with how it should be designed.
So no, there is no problem with using exceptions that can be continued. What you
usually
would like to do is continue from a point before the exception was taken, but after the handler. When the stack is unwound to the handler first, there's no way to do that.
An easy use example would be a debugger that exists as a library. When the program encounters an exception, the handler from the library is given control and can print out or record the context that took the exception. When it's decided what to do (maybe the method had = when it should have ==) corrective steps can be taken and the method re-entered. As it stands users need to use external programs for debugging, which has many problems. Another example is logging. The debugger library could be replaced with a logging library that handles the same exceptions.