### _set_mt_unexpected() and _set_mt_terminate() Functions (OS/2, Windows)

The function _set_mt_terminate() registers a terminate handler exactly the same way set_terminate() does, except that it only affects the current thread. When a terminate function needs to be called, the code first checks to see if a thread terminate handler has been registered. If so, the thread terminate handler is called. If not , the global terminate handler (the one registered with set_ terminate()) is called.

The function _set_mt_unexpected() registers an unexpected handler exactly the same way set_unexpected() does, except that it only affects the current thread. When an unexpected handler needs to be called, the code first checks to see if a thread unexpected handler has been registered. If so, the thread unexpected handler is called. If not, the global unexpected handler (the one registered with set_unexpected()) is called.

C++ Exception Handling Overview

unexpected() and terminate() Functions
set_unexpected() and set_terminate() Functions
Using Exception Handling
Transferring Control
Exception Specifications