userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
exceptions.cpp
1
#
include
<
userver
/
grpc
-
protovalidate
/
client
/
exceptions
.
hpp
>
2
3
#
include
<
fmt
/
format
.
h
>
4
5
USERVER_NAMESPACE_BEGIN
6
7
namespace
grpc_protovalidate::client {
8
9
ValidatorError::ValidatorError(std::string_view call_name)
10
: BaseError(call_name,
"validator internal error (probably validation expression syntax is invalid)"
)
11
{}
12
13
MessageError::MessageError(
14
std::string_view call_name,
15
std::string_view additional_info,
16
buf::validate::ValidationResult&& result
17
)
18
: BaseError(call_name, additional_info),
19
error_info_(std::forward<buf::validate::ValidationResult>(result))
20
{}
21
22
const
buf::validate::ValidationResult& MessageError::GetErrorInfo()
const
{
return
error_info_; }
23
24
ResponseError::ResponseError(std::string_view call_name, buf::validate::ValidationResult&& result)
25
: MessageError(
26
call_name,
27
fmt::format(
"response violates constraints (count={})"
, result.violations_size()),
28
std::move(result)
29
)
30
{}
31
32
RequestError::RequestError(std::string_view call_name, buf::validate::ValidationResult&& result)
33
: MessageError(
34
call_name,
35
fmt::format(
"request violates constraints (count={})"
, result.violations_size()),
36
std::move(result)
37
)
38
{}
39
40
}
// namespace grpc_protovalidate::client
41
42
USERVER_NAMESPACE_END
src
grpc-protovalidate
client
exceptions.cpp
Generated on
for userver by
Doxygen
1.17.0