From 5fba2867f5180b3e6b582bb92cbab59ee64fc620 Mon Sep 17 00:00:00 2001 From: Sandor Magyar Date: Wed, 19 Oct 2022 14:02:21 -0400 Subject: [PATCH] Change mongocxx::exception handler to std::exception --- include/spdlog/sinks/mongo_sink.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/spdlog/sinks/mongo_sink.h b/include/spdlog/sinks/mongo_sink.h index 73184a9d..6a8927f5 100644 --- a/include/spdlog/sinks/mongo_sink.h +++ b/include/spdlog/sinks/mongo_sink.h @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -33,7 +32,7 @@ public: mongo_sink(const std::string &db_name, const std::string &collection_name, const std::string &uri = "mongodb://localhost:27017") try : mongo_sink(std::make_shared(), db_name, collection_name, uri) {} - catch (const mongocxx::exception &e) + catch (const std::exception &e) { throw_spdlog_ex(fmt_lib::format("Error opening database: {}", e.what())); }