diff options
Diffstat (limited to 'raul/Exception.hpp')
-rw-r--r-- | raul/Exception.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/raul/Exception.hpp b/raul/Exception.hpp index b73a5a5..78e9f08 100644 --- a/raul/Exception.hpp +++ b/raul/Exception.hpp @@ -25,10 +25,11 @@ namespace Raul { /** An exception (unexpected error). */ class Exception : public std::exception { public: - const char* what() const throw() { return _what.c_str(); } - ~Exception() throw() {} + const char* what() const noexcept { return _what.c_str(); } + protected: explicit Exception(const std::string& what) : _what(what) {} + private: const std::string _what; }; |