B15F Board 15 Famulus Edition

timeoutexception.h
1 #ifndef TIMEOUTEXCEPTION_H
2 #define TIMEOUTEXCEPTION_H
3
4 #include <exception>
5 #include <string>
6
9 class TimeoutException: public std::exception
10 {
11 public:
16 explicit TimeoutException(const char* message) : msg(message)
17 {
18 }
19
24 explicit TimeoutException(const std::string& message) : msg(message)
25 {
26 }
27
31 virtual ~TimeoutException() = default;
32
37 virtual const char* what() const throw ()
38 {
39 return msg.c_str();
40 }
41
42 protected:
43 std::string msg;
44 };
45
46 #endif // TIMEOUTEXCEPTION_H
TimeoutException::~TimeoutException
virtual ~TimeoutException()=default
TimeoutException::msg
std::string msg
failure description
Definition: timeoutexception.h:43
TimeoutException::what
virtual const char * what() const
Definition: timeoutexception.h:37
TimeoutException::TimeoutException
TimeoutException(const char *message)
Definition: timeoutexception.h:16
TimeoutException
Definition: timeoutexception.h:9
TimeoutException::TimeoutException
TimeoutException(const std::string &message)
Definition: timeoutexception.h:24