Normalized copyright message
This commit is contained in:
parent
46ef71e3ec
commit
540f865355
@ -1,4 +1,23 @@
|
|||||||
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
|
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
|
||||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
SPDLOG_INLINE spdlog::spdlog_ex::spdlog_ex(std::string msg)
|
||||||
|
: msg_(std::move(msg))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE spdlog::spdlog_ex::spdlog_ex(const std::string &msg, int last_errno)
|
||||||
|
{
|
||||||
|
fmt::memory_buffer outbuf;
|
||||||
|
fmt::format_system_error(outbuf, last_errno, msg);
|
||||||
|
msg_ = fmt::to_string(outbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE const char *spdlog::spdlog_ex::what() const SPDLOG_NOEXCEPT
|
||||||
|
{
|
||||||
|
return msg_.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -191,22 +191,9 @@ enum class pattern_time_type
|
|||||||
class spdlog_ex : public std::exception
|
class spdlog_ex : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit spdlog_ex(std::string msg)
|
explicit spdlog_ex(std::string msg);
|
||||||
: msg_(std::move(msg))
|
spdlog_ex(const std::string &msg, int last_errno);
|
||||||
{
|
const char *what() const SPDLOG_NOEXCEPT override;
|
||||||
}
|
|
||||||
|
|
||||||
spdlog_ex(const std::string &msg, int last_errno)
|
|
||||||
{
|
|
||||||
fmt::memory_buffer outbuf;
|
|
||||||
fmt::format_system_error(outbuf, last_errno, msg);
|
|
||||||
msg_ = fmt::to_string(outbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *what() const SPDLOG_NOEXCEPT override
|
|
||||||
{
|
|
||||||
return msg_.c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string msg_;
|
std::string msg_;
|
||||||
@ -246,3 +233,7 @@ std::unique_ptr<T> make_unique(Args &&... args)
|
|||||||
#endif
|
#endif
|
||||||
} // namespace details
|
} // namespace details
|
||||||
} // namespace spdlog
|
} // namespace spdlog
|
||||||
|
|
||||||
|
#ifndef SPDLOG_STATIC_LIB
|
||||||
|
#include "commont-inl.h"
|
||||||
|
#endif
|
@ -1,7 +1,11 @@
|
|||||||
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
|
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
|
||||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
#include "spdlog/spdlog.h"
|
#include <mutex>
|
||||||
|
|
||||||
|
#include "spdlog/common.h"
|
||||||
|
#include "spdlog/common-inl.h"
|
||||||
|
|
||||||
|
|
||||||
#include "spdlog/details/null_mutex.h"
|
#include "spdlog/details/null_mutex.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user