mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 03:19:02 +08:00
astyle
This commit is contained in:
@@ -100,17 +100,21 @@ enum class async_overflow_policy
|
||||
//
|
||||
// Log exception
|
||||
//
|
||||
namespace details { namespace os {
|
||||
std::string errno_str(int err_num);
|
||||
}}
|
||||
namespace details
|
||||
{
|
||||
namespace os
|
||||
{
|
||||
std::string errno_str(int err_num);
|
||||
}
|
||||
}
|
||||
class spdlog_ex : public std::exception
|
||||
{
|
||||
public:
|
||||
spdlog_ex(const std::string& msg) :_msg(msg) {}
|
||||
spdlog_ex(const std::string& msg, int last_errno)
|
||||
{
|
||||
_msg = msg + ": " + details::os::errno_str(last_errno);
|
||||
}
|
||||
spdlog_ex(const std::string& msg, int last_errno)
|
||||
{
|
||||
_msg = msg + ": " + details::os::errno_str(last_errno);
|
||||
}
|
||||
const char* what() const SPDLOG_NOEXCEPT override
|
||||
{
|
||||
return _msg.c_str();
|
||||
|
Reference in New Issue
Block a user