diff --git a/src/UsefulException.cpp b/src/UsefulException.cpp index ad1446d..2f66805 100644 --- a/src/UsefulException.cpp +++ b/src/UsefulException.cpp @@ -12,7 +12,7 @@ UsefulException_::UsefulException_(std::string _message, std::string _file, std: complete_text = ss.str(); } -const char* UsefulException_::what() { +char const* UsefulException_::what() const noexcept { return complete_text.c_str(); } diff --git a/src/UsefulException.hpp b/src/UsefulException.hpp index c823d35..76be2e2 100644 --- a/src/UsefulException.hpp +++ b/src/UsefulException.hpp @@ -17,7 +17,7 @@ class UsefulException_ : public std::exception { public: UsefulException_(std::string msg, std::string _file, std::string _func, int line_n); - const char* what(); + virtual char const* what() const noexcept; }; }