diff options
author | Max Kellermann <max@musicpd.org> | 2020-02-01 13:13:08 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-02-01 13:13:08 +0100 |
commit | 620872390b089a9d33bbcece5e8801819e002004 (patch) | |
tree | ba85aa85318dba822a9dabdec3f6bbf5161d10cd /src/util | |
parent | f7c326dbebde7fce3a21b18c6fb6758b782d8c9f (diff) |
util/Exception: move the forwarded std::exception_ptr
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Exception.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/Exception.cxx b/src/util/Exception.cxx index 43f13865a..acb78f68a 100644 --- a/src/util/Exception.cxx +++ b/src/util/Exception.cxx @@ -29,6 +29,8 @@ #include "Exception.hxx" +#include <utility> + template<typename T> static void AppendNestedMessage(std::string &result, T &&e, @@ -65,7 +67,7 @@ GetFullMessage(std::exception_ptr ep, const char *fallback, const char *separator) noexcept { try { - std::rethrow_exception(ep); + std::rethrow_exception(std::move(ep)); } catch (const std::exception &e) { return GetFullMessage(e, fallback, separator); } catch (const std::nested_exception &ne) { |