From 984015587d16b135c67cdf202510dc87ccdcf730 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Wed, 1 Jul 2020 08:38:33 -0600 Subject: [PATCH] "Rethrow" to promise using std::current_exception() --- daemon/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/main.cpp b/daemon/main.cpp index 2ce12d1ea..4ac024348 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp @@ -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()); } }