std::current_exception() makes a copy of current exception object into returned std::exception_ptr. So the tracking of the original exception object and its stacktrace are lost.