
on Tue Jul 29 2008, Mathias Gaunard <mathias.gaunard-AT-ens-lyon.org> wrote:
Emil Dotchevski wrote:
Throwing an exception doesn't necessarily indicate abnormality, in fact the program might rely on the exception to operate properly (for example, if you're processing a sequence of files, you might want to catch(eof &) and open the next file to be processed.)
That doesn't sound like a good idea, given how exceptions are implemented: a fast normal execution path and a slow recovery path.
Sometimes that's exactly the tradeoff you need.
The difference between exceptions and asserts are that, while both are errors, exceptions is a system to report error and asserts is a system to check that errors do not occur. So the Error Handling category could be subdivided in Error Reporting (which would also contain error codes and logging) and Error Checking (which would also contain the testing framework).
That might be a good idea. -- Dave Abrahams BoostPro Computing http://www.boostpro.com