"Rethrow" to promise using std::current_exception()

pull/1314/head
Stephen Shelton 4 years ago
parent a448cbab4f
commit 984015587d
No known key found for this signature in database
GPG Key ID: EE4BADACCE8B631C

@ -117,12 +117,12 @@ run_main_context(const fs::path confFile, const llarp::RuntimeOptions opts)
catch (std::exception& e)
{
llarp::LogError("Fatal: caught exception while running: ", e.what());
exit_code.set_exception(e);
exit_code.set_exception(std::current_exception());
}
catch (...)
{
llarp::LogError("Fatal: caught non-standard exception while running");
exit_code.set_exception(std::runtime_error("Non-standard exception caught while running");
exit_code.set_exception(std::current_exception());
}
}

Loading…
Cancel
Save