From 6fedffe6d646ddad0d48def251a81de49e6643d1 Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 11 Nov 2018 01:33:08 +0200 Subject: [PATCH] Moved the SPDLOG_CATCH_AND_HANDLE to logger_impl.h --- include/spdlog/common.h | 10 ---------- include/spdlog/details/logger_impl.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 51c5195c..3bd30879 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -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 diff --git a/include/spdlog/details/logger_impl.h b/include/spdlog/details/logger_impl.h index 850f8639..eb5fcdef 100644 --- a/include/spdlog/details/logger_impl.h +++ b/include/spdlog/details/logger_impl.h @@ -10,6 +10,16 @@ #include #include +#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