If I have a C++11 program running two threads, and one of them throws an unhandled exception, what happens? Will the entire program die a fiery death? Will the thread where the exception is thrown die alone (and if so, can I obtain the exception in this case)? Something else entirely?
Nothing has really changed. The wording in n3290 is:
If no matching handler is found, the function
std::terminate()
is called
The behavior of terminate
can be customized with set_terminate
, but:
Required behavior: A
terminate_handler
shall terminate execution of the program without returning to the caller.
So the program exits in such a case, other threads cannot continue running.