My Project
network.hpp
Go to the documentation of this file.
1#ifndef _NETWORK_H
2#define _NETWORK_H
3#include <exception>
4#include <string>
5
6class NetworkException : public std::exception {
7private:
8 std::string errorMsg;
9
10public:
11 NetworkException(const std::string &_errorMsg) : errorMsg(_errorMsg) {}
12 const char *what() const throw() override { return errorMsg.c_str(); }
13};
14#endif // !_NETWORK_H
Definition: network.hpp:6
std::string errorMsg
Definition: network.hpp:8
NetworkException(const std::string &_errorMsg)
Definition: network.hpp:11
const char * what() const override
Definition: network.hpp:12