Mercurial > dedupe
comparison Exception.hpp @ 0:a3834af36579
Working with memory backend.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Mon, 20 Aug 2012 15:49:48 +0200 |
| parents | |
| children | d7b384b4a834 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:a3834af36579 |
|---|---|
| 1 #ifndef EXCEPTION_HPP | |
| 2 #define EXCEPTION_HPP | |
| 3 | |
| 4 #include <QtCore/QString> | |
| 5 | |
| 6 class Exception { | |
| 7 | |
| 8 public: | |
| 9 virtual QString toString() const | |
| 10 { | |
| 11 return errorMsg_; | |
| 12 } | |
| 13 | |
| 14 | |
| 15 protected: | |
| 16 Exception(const QString& errorMsg) : errorMsg_(errorMsg) {} | |
| 17 virtual ~Exception() {} | |
| 18 | |
| 19 void setErrorMsg(QString& errorMsg); | |
| 20 const QString& errorMsg(QString& errorMsg); | |
| 21 | |
| 22 private: | |
| 23 QString errorMsg_; | |
| 24 }; | |
| 25 | |
| 26 #endif //EXCEPTION_HPP |
