1*2bc23fe1SPatrick Venture #pragma once 2*2bc23fe1SPatrick Venture 3*2bc23fe1SPatrick Venture #include <exception> 4*2bc23fe1SPatrick Venture #include <string> 5*2bc23fe1SPatrick Venture 6*2bc23fe1SPatrick Venture class ToolException : public std::exception 7*2bc23fe1SPatrick Venture { 8*2bc23fe1SPatrick Venture public: 9*2bc23fe1SPatrick Venture explicit ToolException(const std::string& message) : message(message){}; 10*2bc23fe1SPatrick Venture 11*2bc23fe1SPatrick Venture virtual const char* what() const noexcept override 12*2bc23fe1SPatrick Venture { 13*2bc23fe1SPatrick Venture return message.c_str(); 14*2bc23fe1SPatrick Venture } 15*2bc23fe1SPatrick Venture 16*2bc23fe1SPatrick Venture private: 17*2bc23fe1SPatrick Venture std::string message; 18*2bc23fe1SPatrick Venture }; 19