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
3
/// @file userver/cache/exceptions.hpp
4
/// @brief Exceptions thrown by components::CachingComponentBase
5
6
#
include
<
stdexcept
>
7
#
include
<
string_view
>
8
9
USERVER_NAMESPACE_BEGIN
10
11
namespace
cache
{
12
13
/// Thrown by components::CachingComponentBase::Get if the cache is empty and
14
/// `MayReturnNull` returns `false` (as by default).
15
class
EmptyCacheError
final
:
public
std::runtime_error {
16
public
:
17
explicit
EmptyCacheError(std::string_view cache_name);
18
};
19
20
/// Thrown by components::CachingComponentBase::PreAssignCheck when the new
21
/// value does not pass the check.
22
class
DataError
:
public
std::runtime_error {
23
using
std::runtime_error::runtime_error;
24
};
25
26
class
EmptyDataError
final
:
public
DataError
{
27
public
:
28
explicit
EmptyDataError(std::string_view cache_name);
29
};
30
31
}
// namespace cache
32
33
USERVER_NAMESPACE_END
userver
cache
exceptions.hpp
Generated on
for userver by
Doxygen
1.17.0