Commit 378c7789 authored by gabime's avatar gabime

Fixed issue #720

parent 15f3b0fe
......@@ -158,18 +158,9 @@ public:
spdlog_ex(const std::string &msg, int last_errno)
{
std::string errno_string;
char buf[500], *buf_ptr = buf;
if (fmt::safe_strerror(last_errno, buf_ptr, sizeof(buf)) == 0)
{
errno_string = buf_ptr;
}
else
{
errno_string = "Unknown error";
}
_msg = msg + ": " + errno_string;
fmt::MemoryWriter writer;
fmt::format_system_error(writer, last_errno, msg);
_msg = writer.str();
}
const char *what() const SPDLOG_NOEXCEPT override
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment