From 168c45cb3b00c8165d6b92578382ccf2abdf7fab Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 15 Aug 2020 14:25:27 +0200 Subject: [PATCH] Further fixes for Exception class on Windows. --- src/Exception.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Exception.hpp b/src/Exception.hpp index 38890de..564c00d 100644 --- a/src/Exception.hpp +++ b/src/Exception.hpp @@ -18,11 +18,16 @@ namespace ArbUt { #endif public: - explicit Exception(std::string msg) : _msg(std::move(msg)) { _stack.load_here(9); } + explicit Exception(std::string msg) : _msg(std::move(msg)) { +#if !WINDOWS + _stack.load_here(9); +#endif + } [[nodiscard]] const char* what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW override { return _msg.c_str(); } - [[nodiscard]] std::string GetStacktrace(size_t depth = 6, bool include_addr = true) const { + [[nodiscard]] std::string GetStacktrace([[maybe_unused]] size_t depth = 6, + [[maybe_unused]] bool include_addr = true) const { #if !WINDOWS backward::TraceResolver tr; tr.load_stacktrace(_stack);