userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
exceptions.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <exception>
7
#include <string>
8
#include <string_view>
9
10
#include <grpcpp/support/status.h>
11
12
USERVER_NAMESPACE_BEGIN
13
15
namespace
ugrpc
{}
16
18
namespace
ugrpc::client
{
19
21
class
BaseError :
public
std::exception {
22
public
:
23
explicit
BaseError(std::string message);
24
25
const
char
* what()
const
noexcept
override
;
26
27
private
:
28
std::string message_;
29
};
30
32
class
RpcError :
public
BaseError {
33
public
:
34
RpcError(std::string_view call_name, std::string_view additional_info);
35
};
36
42
class
RpcInterruptedError final :
public
RpcError {
43
public
:
44
RpcInterruptedError(std::string_view call_name, std::string_view stage);
45
};
46
48
class
RpcCancelledError final :
public
RpcError {
49
public
:
50
RpcCancelledError(std::string_view call_name, std::string_view stage);
51
};
52
57
class
RpcSerializationError
final :
public
RpcError {
58
public
:
60
RpcSerializationError
(std::string_view call_name, std::string_view reason);
61
};
62
65
class
ErrorWithStatus :
public
RpcError {
66
public
:
67
ErrorWithStatus(std::string_view call_name, grpc::Status&& status);
68
69
const
grpc::Status& GetStatus()
const
noexcept
;
70
71
private
:
72
grpc::Status status_;
73
};
74
78
class
CancelledError
final :
public
ErrorWithStatus {
79
public
:
80
using
ErrorWithStatus::ErrorWithStatus;
81
};
82
83
class
UnknownError
final :
public
ErrorWithStatus {
84
public
:
85
using
ErrorWithStatus::ErrorWithStatus;
86
};
87
88
class
InvalidArgumentError
final :
public
ErrorWithStatus {
89
public
:
90
using
ErrorWithStatus::ErrorWithStatus;
91
};
92
93
class
DeadlineExceededError
final :
public
ErrorWithStatus {
94
public
:
95
using
ErrorWithStatus::ErrorWithStatus;
96
};
97
98
class
NotFoundError
final :
public
ErrorWithStatus {
99
public
:
100
using
ErrorWithStatus::ErrorWithStatus;
101
};
102
103
class
AlreadyExistsError
final :
public
ErrorWithStatus {
104
public
:
105
using
ErrorWithStatus::ErrorWithStatus;
106
};
107
108
class
PermissionDeniedError
final :
public
ErrorWithStatus {
109
public
:
110
using
ErrorWithStatus::ErrorWithStatus;
111
};
112
113
class
ResourceExhaustedError
final :
public
ErrorWithStatus {
114
public
:
115
using
ErrorWithStatus::ErrorWithStatus;
116
};
117
118
class
FailedPreconditionError
final :
public
ErrorWithStatus {
119
public
:
120
using
ErrorWithStatus::ErrorWithStatus;
121
};
122
123
class
AbortedError
final :
public
ErrorWithStatus {
124
public
:
125
using
ErrorWithStatus::ErrorWithStatus;
126
};
127
128
class
OutOfRangeError
final :
public
ErrorWithStatus {
129
public
:
130
using
ErrorWithStatus::ErrorWithStatus;
131
};
132
133
class
UnimplementedError
final :
public
ErrorWithStatus {
134
public
:
135
using
ErrorWithStatus::ErrorWithStatus;
136
};
137
138
class
InternalError
final :
public
ErrorWithStatus {
139
public
:
140
using
ErrorWithStatus::ErrorWithStatus;
141
};
142
143
class
UnavailableError
final :
public
ErrorWithStatus {
144
public
:
145
using
ErrorWithStatus::ErrorWithStatus;
146
};
147
148
class
DataLossError
final :
public
ErrorWithStatus {
149
public
:
150
using
ErrorWithStatus::ErrorWithStatus;
151
};
152
153
class
UnauthenticatedError
final :
public
ErrorWithStatus {
154
public
:
155
using
ErrorWithStatus::ErrorWithStatus;
156
};
157
158
159
[[noreturn]]
void
ThrowErrorWithStatus(std::string_view call_name, grpc::Status&& status);
160
161
}
// namespace ugrpc::client
162
163
USERVER_NAMESPACE_END
userver
ugrpc
client
exceptions.hpp
Generated on
for userver by
Doxygen
1.17.0