diff options
author | Sandor Magyar <SMagyar@aphysci.com> | 2022-10-19 21:02:21 +0300 |
---|---|---|
committer | Sandor Magyar <SMagyar@aphysci.com> | 2022-10-19 21:02:21 +0300 |
commit | 5fba2867f5180b3e6b582bb92cbab59ee64fc620 (patch) | |
tree | 7ff3f8824de17fd2be64b8824f2efdb6bd5dfa6f /include/spdlog | |
parent | b5d361fc218e37028692bd30163766f091fdbbcc (diff) |
Change mongocxx::exception handler to std::exception
Diffstat (limited to 'include/spdlog')
-rw-r--r-- | include/spdlog/sinks/mongo_sink.h | 3 |
1 files changed, 1 insertions, 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 <bsoncxx/view_or_value.hpp> #include <mongocxx/client.hpp> -#include <mongocxx/exception/exception.hpp> #include <mongocxx/instance.hpp> #include <mongocxx/uri.hpp> @@ -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<mongocxx::instance>(), 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())); } |