mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Moved the SPDLOG_CATCH_AND_HANDLE to logger_impl.h
This commit is contained in:
parent
d54e302a28
commit
6fedffe6d6
@ -166,16 +166,6 @@ using filename_t = std::wstring;
|
||||
using filename_t = std::string;
|
||||
#endif
|
||||
|
||||
#define SPDLOG_CATCH_AND_HANDLE \
|
||||
catch (const std::exception &ex) \
|
||||
{ \
|
||||
err_handler_(ex.what()); \
|
||||
} \
|
||||
catch (...) \
|
||||
{ \
|
||||
err_handler_("Unknown exeption in logger"); \
|
||||
}
|
||||
|
||||
namespace details {
|
||||
// make_unique support for pre c++14
|
||||
|
||||
|
@ -10,6 +10,16 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#define SPDLOG_CATCH_AND_HANDLE \
|
||||
catch (const std::exception &ex) \
|
||||
{ \
|
||||
err_handler_(ex.what()); \
|
||||
} \
|
||||
catch (...) \
|
||||
{ \
|
||||
err_handler_("Unknown exeption in logger"); \
|
||||
}
|
||||
|
||||
// create logger with given name, sinks and the default pattern formatter
|
||||
// all other ctors will call this one
|
||||
template<typename It>
|
||||
|
Loading…
Reference in New Issue
Block a user