From 72352994f7492558e1761aff40c4d89718e372fc Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Fri, 22 Mar 2024 21:57:04 +0500 Subject: [PATCH] exception method signature fix --- src/UsefulException.cpp | 2 +- src/UsefulException.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }; }