⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
userver
C++ Async Framework v2.0
Documentation
API Groups
Namespaces
Reference
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
y
Variables
k
n
r
u
w
Typedefs
c
d
h
m
n
o
p
s
t
u
v
Enumerations
a
b
c
d
f
h
i
l
o
p
r
s
t
u
v
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Symbols
File List
File Members
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
▼
userver
Documentation
►
API Groups
►
Namespaces
▼
Reference
►
Namespace Members
►
Class List
Class Index
►
Class Hierarchy
►
Class Members
▼
File List
►
en
►
testsuite
►
userver
►
userver
►
userver
►
userver
►
userver
▼
userver
►
cache
►
formats
▼
storages
▼
mongo
►
bulk.hpp
►
bulk_ops.hpp
►
collection.hpp
component.hpp
►
cursor.hpp
dist_lock_component_base.hpp
dist_lock_strategy.hpp
►
exception.hpp
mongo_error.hpp
multi_mongo.hpp
►
operations.hpp
►
options.hpp
pool.hpp
►
pool_config.hpp
write_result.hpp
mongo.hpp
►
userver
►
userver
►
userver
►
userver
►
userver
►
userver
►
File Members
►
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
mongo_error.hpp
1
#
pragma
once
2
3
#
include
<
string
>
4
5
#
include
<
bson
/
bson
.
h
>
6
7
USERVER_NAMESPACE_BEGIN
8
9
namespace
storages
::mongo {
10
11
/// MongoDB error
12
class
MongoError
{
13
public
:
14
/// Error kinds
15
enum
class
Kind
{
16
kNoError
,
///< Error was not reported correctly
17
kNetwork
,
///< @copybrief NetworkException
18
kClusterUnavailable
,
///< @copybrief ClusterUnavailableException
19
kIncompatibleServer
,
///< @copybrief IncompatibleServerException
20
kAuthentication
,
///< @copybrief AuthenticationException
21
kQuery
,
///< @copybrief QueryException
22
kInvalidQueryArgument
,
///< @copybrief InvalidQueryArgumentException
23
kServer
,
///< @copybrief ServerException
24
kWriteConcern
,
///< @copybrief WriteConcernException
25
kDuplicateKey
,
///< @copybrief DuplicateKeyException
26
kOther
///< Unclassified error
27
};
28
29
/// @cond
30
/// Creates a not-an-error
31
MongoError();
32
/// @endcond
33
34
/// Checks whether an error is set up
35
explicit
operator
bool
()
const
;
36
37
/// Checks whether this is a server error
38
bool
IsServerError
()
const
;
39
Kind
GetKind()
const
;
40
41
uint32_t Code()
const
;
42
const
char
* Message()
const
;
43
44
/// @cond
45
/// Error domain, for internal use
46
uint32_t Domain()
const
;
47
48
/// Returns native type, internal use only
49
bson_error_t* GetNative();
50
/// @endcond
51
52
/// Unconditionally throws specialized MongoException
53
[[
noreturn
]]
void
Throw
(std::string prefix)
const
;
54
55
private
:
56
bson_error_t value_;
57
};
58
59
}
// namespace storages::mongo
60
61
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
storages
mongo
mongo_error.hpp
Generated on Wed May 15 2024 22:27:19 for userver by
Doxygen
1.10.0