# B15F: drv/timeoutexception.h Source File

timeoutexception.h
#ifndef TIMEOUTEXCEPTION_H
#define TIMEOUTEXCEPTION_H
#include <exception>
#include <string>
class TimeoutException: public std::exception
{
public:
explicit TimeoutException(const char* message) : msg(message)
{
}
explicit TimeoutException(const std::string& message) : msg(message)
{
}
virtual ~TimeoutException() = default;
virtual const char* what() const throw ()
{
return msg.c_str();
}
protected:
std::string msg;
};
#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