userver
C++ Async Framework
Loading...
Searching...
No Matches
error.hpp
1
#
pragma
once
2
3
#
include
<
stdexcept
>
4
5
#
include
<
fmt
/
format
.
h
>
6
7
USERVER_NAMESPACE_BEGIN
8
9
namespace
compression {
10
11
/// Base class for decompression errors
12
class
DecompressionError
:
public
std::runtime_error {
13
using
std::runtime_error::runtime_error;
14
};
15
16
/// Decompressed data size exceeds the limit
17
class
TooBigError
:
public
DecompressionError
{
18
public
:
19
TooBigError() :
DecompressionError
(
"Decompressed data exceeds the limit"
) {}
20
};
21
22
class
ErrWithCode
:
public
DecompressionError
{
23
public
:
24
explicit
ErrWithCode(
const
char
* errName)
25
:
DecompressionError
(fmt::format(
"Decompression failed: {}"
, errName)) {}
26
};
27
28
}
// namespace compression
29
30
USERVER_NAMESPACE_END
userver
compression
error.hpp
Generated on Thu Oct 3 2024 13:14:52 for userver by
Doxygen
1.10.0