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 manager operations. 9 : */ 10 : class ManagerException : public std::exception { 11 : public: 12 1 : explicit ManagerException(const std::string &message) : message_(message) {} 13 1 : const char *what() const noexcept override { return message_.c_str(); } 14 : 15 : private: 16 : std::string message_; 17 : }; 18 : } // namespace sipai