From 6d355fd602b84002a504983a083ef5af0dcd704e Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 22 Dec 2017 14:38:44 +0200 Subject: [PATCH] report about unknown excepptions before rethrow --- include/spdlog/details/logger_impl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; + } }