As can be seen in the previous sections, while it might seem at first that code written to deal with program errors by using exceptions and code written using simple status error codes are very similar, it is not true anymore if you use a few relatively simple tricks: the exception-based code becomes much cleaner which is what exceptions were designed to deliver.
It was often pointed out that, while exceptions do provide nicer-looking code in a lot of cases, it is very difficult to write exception-safe code in all cases. Some people claim that programmers then spend most of their time thinking about how to write exception-safe code and not how to to write their application. What these people forget is that if they decide not to use exceptions, they still need to do something about their program errors: how do you propagate errors up to the piece of code which can deal with it ?
There are not many solutions:
Use error codes as function/method return values, propagate the error to the caller whenever needed: code is not so nice-looking and easy to read.
Use the good old evil setjmp/longjmp (it is even more evil in the context of C++ code than in the context of C code because the destructors of all the automatic variables on the stack will never be invoked).
Try to use a different exception framework: see the section called “References”, David Turner's paper.
I don't think that any of the above solutions provide a framework which might provide better-looking code than straight exception-based code.
A lot of other people dismiss exception-based code by complaining either about the performance hit or their compiler's compliance to the C++ standard. There isn't much I can do about standard compliance: as far as I can tell, gcc runs on quite a lot of platforms which means you should be able to get pretty good compliance on anything. EDG also sells its standard-compliant C++ frontend to a lot of companies which means you should be able to buy a pretty good compiler for your platforms unless it is very bizare. If you can't, then, what can I say ?
Measuring the performance of exception-based code is pretty difficult: the only interesting reference I could find is available in the section called “References”. I will probably try to do some measurements myself in another article.