mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
Remove pointless try block in mongo_sink
This commit is contained in:
parent
1bb1f05d73
commit
5f67ef4d6f
@ -31,8 +31,7 @@ class mongo_sink : public base_sink<Mutex>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
mongo_sink(const std::string &db_name, const std::string &collection_name, const std::string &uri = "mongodb://localhost:27017")
|
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) {}
|
: mongo_sink(std::make_shared<mongocxx::instance>(), db_name, collection_name, uri) {}
|
||||||
catch (...) {} // Re-throws exception
|
|
||||||
|
|
||||||
mongo_sink(const std::shared_ptr<mongocxx::instance> &instance, const std::string &db_name, const std::string &collection_name, const std::string &uri = "mongodb://localhost:27017")
|
mongo_sink(const std::shared_ptr<mongocxx::instance> &instance, const std::string &db_name, const std::string &collection_name, const std::string &uri = "mongodb://localhost:27017")
|
||||||
: instance_(instance)
|
: instance_(instance)
|
||||||
|
Loading…
Reference in New Issue
Block a user