diff --git a/include/spdlog/details/logger_impl.h b/include/spdlog/details/logger_impl.h index 22f6fa9c..a71ae10f 100644 --- a/include/spdlog/details/logger_impl.h +++ b/include/spdlog/details/logger_impl.h @@ -98,6 +98,11 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* msg) { _err_handler(ex.what()); } + catch (...) + { + _err_handler("Unknown exception in logger " + _name); + throw; + } } template @@ -114,6 +119,11 @@ inline void spdlog::logger::log(level::level_enum lvl, const T& msg) { _err_handler(ex.what()); } + catch (...) + { + _err_handler("Unknown exception in logger " + _name); + throw; + } }