This is the code I have.
try { // code throws potentially unknown exception } catch (...) { std::exception_ptr eptr = std::current_exception();
try { std::rethrow_exception(eptr); } catch (const std::exception& e) { std::cerr << e.what() << std::endl; }
http://en.cppreference.com/w/cpp/error/exception_ptr