| re: How to catch all runtime exception
* chris:[color=blue]
> Thanks Neelesh Bodas,
>
> So, there's no way in C++ I can handle any runtime exception ?
> Anyway, I'm coming from Java environment, and all exception
> inherited from Exception class, so I can caught all runtime
> exception. the point is, how can I prevent my code to "explode",
> caused by uncaught exception.[/color]
In C++, if you have an integer divide by zero, say, you have a bug that
should be fixed.
There is no guarantee of exceptions for bug manifestations.
Neither is there such a guarantee in Java, but in Java you have a better
chance of suppressing the most common _immediate_ effects of bugs, the
Ostrich policy of "what I don't see doesn't exist", until the bugs have
multiplied & migrated to the point where the code can't be rescued.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? |