Mercurial > dedupe
diff Exception.hpp @ 9:b5943e4bf676
Fix up header includes.
Introduce outer catch.
Fix coding style.
Remove spurious debug output.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Wed, 22 Aug 2012 18:48:07 +0200 |
| parents | d7b384b4a834 |
| children | 06166d6c083b |
line wrap: on
line diff
--- a/Exception.hpp Wed Aug 22 18:18:20 2012 +0200 +++ b/Exception.hpp Wed Aug 22 18:48:07 2012 +0200 @@ -6,7 +6,9 @@ class Exception { public: - virtual QString toString() const + typedef QString string_t; + + virtual const string_t& toString() const { return errorMsg_; } @@ -17,14 +19,14 @@ protected: - Exception(const QString& errorMsg) : errorMsg_(errorMsg) {} + Exception(const string_t& errorMsg) : errorMsg_(errorMsg) {} virtual ~Exception() {} - void setErrorMsg(QString& errorMsg); - const QString& errorMsg(QString& errorMsg); + void setErrorMsg(string_t& errorMsg); + const string_t& errorMsg(string_t& errorMsg); private: - QString errorMsg_; + string_t errorMsg_; }; #endif //EXCEPTION_HPP
