-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstatic_container_exception.hpp
53 lines (42 loc) · 1.11 KB
/
static_container_exception.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* @file static_container_exception.hpp
* @brief
* @date 2019-4-20
* @author Peter
* @copyright
* Peter of [ThinkSpirit Laboratory](http://thinkspirit.org/)
* of [Nanjing University of Information Science & Technology](http://www.nuist.edu.cn/)
* all rights reserved
*/
#ifndef KERBAL_CONTAINER_STATIC_CONTAINER_EXCEPTION_HPP
#define KERBAL_CONTAINER_STATIC_CONTAINER_EXCEPTION_HPP
#include <stdexcept>
namespace kerbal
{
namespace container
{
class static_container_empty_exception:
public std::logic_error
{
public:
static_container_empty_exception() :
std::logic_error("the static container is empty")
{
}
};
class static_container_full_exception:
public std::logic_error
{
public:
static_container_full_exception() :
std::logic_error("the static container is full")
{
}
explicit static_container_full_exception(std::size_t /*max_capacity*/) :
std::logic_error("the static container is full")
{
}
};
} // namespace container
} // namespace kerbal
#endif // KERBAL_CONTAINER_STATIC_CONTAINER_EXCEPTION_HPP