quote:Original post by DrPizza
Exceptions are not free.
Nobody said they were.
quote:
Exceptions are not universally available; particularl environments may not have them, interopability constraints may not permit them.
But we''re not talking about any of those environments.
quote:
And most importantly, most error conditions are not exceptional.
Which is a reasonable statement. However, it would appear Paul has already decided that a bool is sufficient to capture the needed return value from his function for the "normal" flow of control to continue. Once that decision has been made, I don''t see any need to clutter the code with transporting exceptional error information along with the standard processing, as the AP was suggesting. For example, he had an "out of memory" return code in his example, and I wanted to find out what his specific objection was to using exceptions to transport that sort of information.
[C++ FAQ Lite | ACCU | Boost | Stroustrup on Learning C++]