#include <userver/storages/mongo/mongo_error.hpp>
MongoDB error.
Definition at line 12 of file mongo_error.hpp.
Public Types | |
enum class | Kind { kNoError , kNetwork , kClusterUnavailable , kIncompatibleServer , kAuthentication , kQuery , kInvalidQueryArgument , kServer , kWriteConcern , kDuplicateKey , kOther } |
Error kinds. More... | |
Public Member Functions | |
operator bool () const | |
Checks whether an error is set up. | |
bool | IsServerError () const |
Checks whether this is a server error. | |
Kind | GetKind () const |
uint32_t | Code () const |
const char * | Message () const |
void | Throw (std::string prefix) const |
Unconditionally throws specialized MongoException. | |
|
strong |
Error kinds.
Enumerator | |
---|---|
kNoError | Error was not reported correctly. |
kNetwork | Network (connectivity) error. |
kClusterUnavailable | No server available to satisfy request constraints. |
kIncompatibleServer | Incompatible server version. |
kAuthentication | Authentication error. |
kQuery | Generic query error. |
kInvalidQueryArgument | Query argument validation error. |
kServer | Server-side error. |
kWriteConcern | Write concern error. |
kDuplicateKey | Duplicate key error. |
kOther | Unclassified error. |
Definition at line 15 of file mongo_error.hpp.