On Fri, 13 Apr 2001 19:27:06 -0300, Edson Alves Pereira 
    <[EMAIL PROTECTED]> somehow managed to type:

<snip suggestion to replace assert() with exceptions>

Firstly, assertions and exceptions have completely different
purposes. Exceptions are for error conditions you _expect_ will occur, and
want to deal with. Assertions are for error conditions that should not
occur at all, but you want to check for in case there's a bug that causes
it to happen.

Secondly, this is from http://www.mozilla.org/hacking/portable-cpp.html

"Don't use exceptions.

"Exceptions are another C++ feature which is not very widely implemented,
and as such, their use is not portable C++ code. Don't use
them. Unfortunately, there is no good workaround that produces similar
functionality.

"One exception to this rule (don't say it) is that it's probably ok, and
may be necessary to use exceptions in some machine specific code. If you
do use exceptions in machine specific code you must catch all exceptions
there because you can't throw the exception across XP (cross
platform) code."

Charles Miller


Reply via email to