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())); }