Mercurial > dedupe
view Exception/Exception.hpp @ 69:9161e9fd5b3f
Taking code out of class definition.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Sat, 12 Jan 2013 11:50:42 +0100 |
| parents | b2c2c2bf2bbd |
| children | c9447697609f |
line wrap: on
line source
#ifndef EXCEPTION_HPP #define EXCEPTION_HPP #include <QtCore/QString> class Exception { public: typedef QString string_t; virtual const string_t& toString() const { return errorMsg_; } void raise() const { throw *this; } protected: Exception(const string_t& errorMsg = string_t()) : errorMsg_(errorMsg) {} virtual ~Exception() {} void setErrorMsg(string_t& errorMsg); const string_t& errorMsg(string_t& errorMsg); private: string_t errorMsg_; }; #endif //EXCEPTION_HPP
