This commit is contained in:
gabime 2018-06-13 20:19:13 +03:00
parent da0d6d0478
commit 6d5670fde7

View File

@ -9,13 +9,13 @@
#include "spdlog/tweakme.h"
#include <algorithm>
#include <atomic>
#include <chrono>
#include <stdexcept>
#include <functional>
#include <algorithm>
#include <initializer_list>
#include <memory>
#include <stdexcept>
#include <string>
#include <unordered_map>
@ -147,8 +147,15 @@ enum class pattern_time_type
class spdlog_ex : public std::runtime_error
{
public:
explicit spdlog_ex(const std::string& msg) : runtime_error(msg){}
spdlog_ex(const std::string& msg, int last_errno) : runtime_error(msg), last_errno_(last_errno){}
explicit spdlog_ex(const std::string &msg)
: runtime_error(msg)
{
}
spdlog_ex(const std::string &msg, int last_errno)
: runtime_error(msg)
, last_errno_(last_errno)
{
}
const char *what() const SPDLOG_NOEXCEPT override
{
if (last_errno_)
@ -166,7 +173,6 @@ public:
private:
int last_errno_{0};
};
//