/** * @file include/ActivMiddleware/ActivBase/AlertMessageException.h * * @brief Header file for the AlertMessageException class. */ #if (!defined ACTIV_BASE_ALERT_MESSAGE_EXCEPTION_H) #define ACTIV_BASE_ALERT_MESSAGE_EXCEPTION_H #include "ActivMiddleware/ActivBase/External.h" #include "ActivMiddleware/ActivBase/ActivBase.h" #include ACTIV_BOOST_INCLUDE(exception/all.hpp) //! Activ namespace. namespace Activ { /** * @brief AlertMessage exception class. * * Calls AlertMessage() with the provided string. Useful to both alert and throw an error. */ class AlertMessageException : public virtual Boost::exception, public virtual std::exception { public: /** * @brief Constructor. * * @param alertType * @param alertId * @param pMessage string to alert. */ ACTIV_BASE_API AlertMessageException(const AlertType alertType, const AlertId alertId, const char * const pMessage); /** * @brief Constructor. * * @param alertType * @param alertId * @param message string to alert. */ ACTIV_BASE_API AlertMessageException(const AlertType alertType, const AlertId alertId, const String &message); /** * @brief Destructor. */ ACTIV_BASE_API ~AlertMessageException() throw(); // std::exception overrides. ACTIV_BASE_API virtual const char *what() const throw() ACTIV_OVERRIDE; private: const String m_message; }; } // namespace Activ #endif // (!defined ACTIV_BASE_ALERT_MESSAGE_EXCEPTION_H)