Mercurial > dedupe
diff Exception/Exception.hpp @ 73:c9447697609f
Fixed some issues with raise.
100% function code coverage for Exceptions.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Thu, 31 Jan 2013 20:33:01 +0100 |
| parents | b2c2c2bf2bbd |
| children | 19d8825ec501 |
line wrap: on
line diff
--- a/Exception/Exception.hpp Thu Jan 31 17:26:21 2013 +0100 +++ b/Exception/Exception.hpp Thu Jan 31 20:33:01 2013 +0100 @@ -1,6 +1,8 @@ #ifndef EXCEPTION_HPP #define EXCEPTION_HPP +#define NORETURN __attribute__ ((noreturn)) + #include <QtCore/QString> class Exception { @@ -12,11 +14,8 @@ { return errorMsg_; } - void raise() const - { - throw *this; - } + virtual void raise() const NORETURN = 0; protected: Exception(const string_t& errorMsg = string_t()) : errorMsg_(errorMsg) {}
