#include #include #include #include using namespace std ; mutex mutexObj1 ; mutex mutexObj2 ; void function1() { throw 1 ; } int main() { try { thread th1 ( function1 ) ; th1.join() ; } catch( int& x1 ) { cout << "Catch handler in main." << endl ; } cout << "Main:" << endl ; return 0 ; }