1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#pragma once #include <exception> #include <string> class InvalidArgumentException : public std::exception { public: InvalidArgumentException(const std::string& msg); virtual const char* what() const noexcept; private: std::string msg_; };