Andrew <email@example.com> wrote in news:2ae3f600-75ca-4398-
> Yes. The Microsoft compilers turn SEGV etc into C++ exceptions. This
> means that catching exceptions by the base class will inadvertantly
> catch these cases.
What's the problem here?
Doesn't that happen only if you explicitly catch those exceptions? (Or
implicitly, via a ... catch.) If your code catches only exceptions that
it's interested in, these "hardware" exceptions should percolate past it,
up to (and possibly out of) the thread. Is this any different from a low-
level library throwing an undocumented exception? (In this case, the
hardware is the "low level library" that's throwing the exception.)
My code does put a final catch around each thread and main to insure that
the user sees any unexpected exceptions (to report back to me). It first
tries to catch std::exception and then "...". Popping up my own messagebox
is more informative than depending on the MS one. I don't know how the gcc
runtime or various Linux windowing environments handle unhandled
exceptions. Their reporting might be good enough to let the exception go to
them. For a "headless" application (eg. in an embedded appliance), the
final catch can log the exception for post-mortem.
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]