You can stash/rethrow exceptions since c++11 with an exception pointer if you really need to.
https://en.cppreference.com/w/cpp/error/exception_ptr