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);