From 10000c383a8af650f4d286a1a153fdb13c0fbac8 Mon Sep 17 00:00:00 2001 From: gabime Date: Wed, 3 Oct 2018 00:26:58 +0300 Subject: [PATCH] Better error message if WideCharToMultiByte fails --- include/spdlog/details/logger_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/logger_impl.h b/include/spdlog/details/logger_impl.h index 339c01e5..277adb11 100644 --- a/include/spdlog/details/logger_impl.h +++ b/include/spdlog/details/logger_impl.h @@ -193,7 +193,7 @@ inline void wbuf_to_utf8buf(const fmt::wmemory_buffer &wbuf, fmt::memory_buffer } else { - throw spdlog::spdlog_ex("Failed converting to utf8", errno); + throw spdlog::spdlog_ex(fmt::format("WideCharToMultiByte failed. Last error: {}", ::GetLastError())); } }