MessageException.h 451 B

1234567891011121314151617181920212223
  1. #ifndef MESSAGEEXCEPTION_H
  2. #define MESSAGEEXCEPTION_H
  3. #include <exception>
  4. #include <QString>
  5. class MessageException : public std::exception
  6. {
  7. public:
  8. MessageException(const QString &msg):message(msg){};
  9. ~MessageException() throw() {};
  10. virtual const char* what() const throw () {
  11. return "MessageException";
  12. }
  13. QString getMessage() const {return message;};
  14. private:
  15. QString message;
  16. };
  17. #endif // MESSAGEEXCEPTION_H