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) :
DecompressionError
(fmt::format(
"Decompression failed: {}"
, errName)) {}
25
};
26
27
}
// namespace compression
28
29
USERVER_NAMESPACE_END
userver
compression
error.hpp
Generated on Tue Nov 19 2024 11:33:04 for userver by
Doxygen
1.10.0