From 0d10e21c2fee9142da39d03d4507ff8554349e37 Mon Sep 17 00:00:00 2001 From: Wolfgang Petroschka Date: Tue, 17 Aug 2021 17:50:35 +0200 Subject: [PATCH] Remove inner try catch in SPDLOG_LOGGER_CATCH The fmt::format call should not throw formatting the exception message and the source code location. --- include/spdlog/logger.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 70c79ed5..ce42d69d 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -33,14 +33,7 @@ { \ if(location.filename) \ { \ - try \ - { \ - err_handler_(fmt::format("{} [{}({})]", ex.what(), location.filename, location.line)); \ - } \ - catch (const std::exception &ex) \ - { \ - err_handler_(ex.what()); \ - } \ + err_handler_(fmt::format("{} [{}({})]", ex.what(), location.filename, location.line)); \ } \ else \ { \