R
Ron James
In my multi-threaded application, a Win32 structured exception is
occasionally thrown from a worker thread. Or perhaps a worker thread might
throw a C++ exception. I can catch the Win32 structured exception in my
Main thread and take remedial action. However the C++ exception appears to
be handle by something (the CRT ?) which (a) pops up an unwanted dialog box
and (b) terminates my thread without my main thread ever getting to hear
about it.
I assume the CRT (or whatever) is deciding that I have an unhandled C++
exception and is "helping me out". Can I persuade the CRT somehow that I
want my main thread to catch a C++ exception which has been thrown in a
worker thread?
Obviously I can wrap each worker thread in a C++ try/catch block, but I'd
rather a more generic solution if one is available.
Many thanks
occasionally thrown from a worker thread. Or perhaps a worker thread might
throw a C++ exception. I can catch the Win32 structured exception in my
Main thread and take remedial action. However the C++ exception appears to
be handle by something (the CRT ?) which (a) pops up an unwanted dialog box
and (b) terminates my thread without my main thread ever getting to hear
about it.
I assume the CRT (or whatever) is deciding that I have an unhandled C++
exception and is "helping me out". Can I persuade the CRT somehow that I
want my main thread to catch a C++ exception which has been thrown in a
worker thread?
Obviously I can wrap each worker thread in a C++ try/catch block, but I'd
rather a more generic solution if one is available.
Many thanks