From 7de12d53b54b3a1ee31a1f6b75dfae63bd1a4bf3 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 15 Aug 2020 16:14:06 +0200 Subject: [PATCH] Implements noexcept copy constructor for Exception. --- src/Exception.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Exception.hpp b/src/Exception.hpp index 154c1a2..3043de4 100644 --- a/src/Exception.hpp +++ b/src/Exception.hpp @@ -23,7 +23,8 @@ namespace ArbUt { #endif } - public: + Exception(const Exception& e) noexcept : std::logic_error(e.what()), _stack(e._stack) {} + const char* what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW override { return logic_error::what(); } [[nodiscard]] std::string GetStacktrace([[maybe_unused]] size_t depth = 6,