Browse Source

Fix SonarLint findings in Exception class

Patrick-Christopher Mattulat 11 months ago
parent
commit
da4b98b4d7

+ 1 - 3
include/ls-std/core/exception/Exception.hpp

@@ -22,15 +22,13 @@ namespace ls::std::core
     public:
 
       explicit Exception(::std::string _name);
-      ~Exception() noexcept override;
+      ~Exception() noexcept override = 0;
 
       [[nodiscard]] ::std::string getName() const;
-      [[nodiscard]] const char *what() const noexcept override = 0;
 
     protected:
 
       [[nodiscard]] const char *_getIdentifiedMessage(const ::std::string &_defaultMessage) const;
-      [[nodiscard]] ::std::string _getMessage() const;
       void _setMessage(::std::string_view _message);
 
     private:

+ 0 - 5
source/ls-std/core/exception/Exception.cpp

@@ -41,11 +41,6 @@ const char *Exception::_getIdentifiedMessage(const string &_defaultMessage) cons
   return ExceptionMessage{concatenatedMessage}.toCharacterPointer();
 }
 
-string Exception::_getMessage() const
-{
-  return this->message;
-}
-
 void Exception::_setMessage(string_view _message)
 {
   this->message = _message;