knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
MongoException.h
Go to the documentation of this file.
1 #ifndef KNOWROB_MONGO_EXCEPTION_H
2 #define KNOWROB_MONGO_EXCEPTION_H
3 
4 #include <mongoc.h>
5 #include <knowrob/storage/StorageError.h>
6 
7 namespace knowrob::mongo {
11  class MongoException : public StorageError {
12  public:
13  MongoException(const char *msg, const bson_error_t &err)
14  : StorageError("[mongo] {}: {}.", msg, err.message),
15  bsonMessage_(err.message),
16  contextMessage_(msg) {}
19  };
20 }
21 
22 #endif //KNOWROB_MONGO_EXCEPTION_H
const std::string bsonMessage_
const std::string contextMessage_
MongoException(const char *msg, const bson_error_t &err)
TermRule & string()
Definition: terms.cpp:63