#ifndef _NETWORK_H #define _NETWORK_H #include <exception> #include <string> class NetworkException : public std::exception { private: std::string errorMsg; public: NetworkException(const std::string &_errorMsg) : errorMsg(_errorMsg) {} const char *what() const throw() override { return errorMsg.c_str(); } }; #endif // !_NETWORK_H