MongoDB error.
More...
#include <userver/storages/mongo/mongo_error.hpp>
|
| enum class | Kind {
kNoError
,
kNetwork
,
kClusterUnavailable
,
kIncompatibleServer
,
kAuthentication
,
kQuery
,
kInvalidQueryArgument
,
kServer
,
kWriteConcern
,
kDuplicateKey
,
kOther
} |
| | Error kinds. More...
|
| |
|
|
| 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.
|
| |
MongoDB error.
Definition at line 12 of file mongo_error.hpp.
◆ Kind
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.
The documentation for this class was generated from the following file: