Line data Source code
1 : #pragma once 2 : #include <exception> 3 : #include <string> 4 : 5 : namespace sipai { 6 : /** 7 : * @brief A custom exception class that inherits from std::exception. 8 : * This class is thrown when there are issues with runner operations. 9 : */ 10 : class RunnerVisitorException : public std::exception { 11 : public: 12 5 : explicit RunnerVisitorException(const std::string &message) 13 5 : : message_(message) {} 14 5 : const char *what() const noexcept override { return message_.c_str(); } 15 : 16 : private: 17 : std::string message_; 18 : }; 19 : } // namespace sipai