Browse Source

Merge branch 'exception-base-class' of public/ls-standard-library into development

patrick-christopher.mattulat 1 year ago
parent
commit
23de452235
47 changed files with 339 additions and 326 deletions
  1. 1 2
      CMakeLists.txt
  2. 2 0
      README.md
  3. 3 7
      include/ls-std/core/exception/EventNotHandledException.hpp
  4. 3 7
      include/ls-std/core/exception/EventNotSubscribedException.hpp
  5. 36 0
      include/ls-std/core/exception/Exception.hpp
  6. 3 8
      include/ls-std/core/exception/FileNotFoundException.hpp
  7. 3 7
      include/ls-std/core/exception/FileOperationException.hpp
  8. 3 7
      include/ls-std/core/exception/IllegalArgumentException.hpp
  9. 3 7
      include/ls-std/core/exception/IllegalArithmeticOperationException.hpp
  10. 3 7
      include/ls-std/core/exception/IncompleteJsonException.hpp
  11. 3 7
      include/ls-std/core/exception/IndexOutOfBoundsException.hpp
  12. 3 7
      include/ls-std/core/exception/NullPointerException.hpp
  13. 0 35
      include/ls-std/core/exception/WrongCallException.hpp
  14. 2 2
      include/ls-std/ls-std-core.hpp
  15. 8 5
      source/ls-std/core/exception/EventNotHandledException.cpp
  16. 8 5
      source/ls-std/core/exception/EventNotSubscribedException.cpp
  17. 25 0
      source/ls-std/core/exception/Exception.cpp
  18. 8 5
      source/ls-std/core/exception/FileNotFoundException.cpp
  19. 8 5
      source/ls-std/core/exception/FileOperationException.cpp
  20. 8 5
      source/ls-std/core/exception/IllegalArgumentException.cpp
  21. 8 5
      source/ls-std/core/exception/IllegalArithmeticOperationException.cpp
  22. 8 5
      source/ls-std/core/exception/IncompleteJsonException.cpp
  23. 8 5
      source/ls-std/core/exception/IndexOutOfBoundsException.cpp
  24. 8 5
      source/ls-std/core/exception/NullPointerException.cpp
  25. 0 34
      source/ls-std/core/exception/WrongCallException.cpp
  26. 9 5
      test/cases/core/evaluator/EmptyStringArgumentEvaluatorTest.cpp
  27. 9 5
      test/cases/core/evaluator/IndexOutOfBoundsEvaluatorTest.cpp
  28. 9 5
      test/cases/core/evaluator/NullPointerArgumentEvaluatorTest.cpp
  29. 9 5
      test/cases/core/evaluator/NullPointerEvaluatorTest.cpp
  30. 14 5
      test/cases/core/exception/EventNotHandledExceptionTest.cpp
  31. 14 5
      test/cases/core/exception/EventNotSubscribedExceptionTest.cpp
  32. 14 5
      test/cases/core/exception/FileNotFoundExceptionTest.cpp
  33. 14 5
      test/cases/core/exception/FileOperationExceptionTest.cpp
  34. 14 5
      test/cases/core/exception/IllegalArgumentExceptionTest.cpp
  35. 14 5
      test/cases/core/exception/IllegalArithmeticOperationExceptionTest.cpp
  36. 14 5
      test/cases/core/exception/IncompleteJsonExceptionTest.cpp
  37. 14 5
      test/cases/core/exception/IndexOutOfBoundsExceptionTest.cpp
  38. 14 5
      test/cases/core/exception/NullPointerExceptionTest.cpp
  39. 0 67
      test/cases/core/exception/WrongCallExceptionTest.cpp
  40. 2 2
      test/cases/io/evaluator/FileExistenceEvaluatorTest.cpp
  41. 2 2
      test/cases/io/section-pair/evaluator/SectionPairIdentifierArgumentEvaluatorTest.cpp
  42. 1 1
      test/cases/io/section-pair/evaluator/SectionPairRowArgumentEvaluatorTest.cpp
  43. 1 1
      test/cases/io/section-pair/evaluator/SectionPairRowListValueArgumentEvaluatorTest.cpp
  44. 1 1
      test/cases/io/section-pair/evaluator/SectionPairRowSingleValueArgumentEvaluatorTest.cpp
  45. 1 1
      test/cases/io/section-pair/evaluator/SectionPairSectionArgumentEvaluatorTest.cpp
  46. 2 2
      test/cases/io/section-pair/evaluator/SectionPairValueArgumentEvaluatorTest.cpp
  47. 2 2
      test/cases/io/section-pair/reader/SectionPairFileReaderTest.cpp

+ 1 - 2
CMakeLists.txt

@@ -133,6 +133,7 @@ set(SOURCE_FILES_CORE
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/evaluator/NullPointerEvaluator.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/EventNotHandledException.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/EventNotSubscribedException.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/Exception.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/ExceptionMessage.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/FileNotFoundException.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/FileOperationException.cpp
@@ -141,7 +142,6 @@ set(SOURCE_FILES_CORE
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/IncompleteJsonException.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/IndexOutOfBoundsException.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/NullPointerException.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/exception/WrongCallException.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/interface/IBoxing.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/interface/IEncoding.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/interface/IEvaluator.cpp
@@ -252,7 +252,6 @@ if (${LS_STD_BUILD_WITH_TESTS})
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/IncompleteJsonExceptionTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/IndexOutOfBoundsExceptionTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/NullPointerExceptionTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/WrongCallExceptionTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/ClassTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/ConditionalFunctionExecutorTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/LibraryVersionTest.cpp

+ 2 - 0
README.md

@@ -40,6 +40,8 @@ A __Date__ class comes with this submodule, which you can use to represent a dat
   more convenient way
 - a section-pair file standard has been implemented and is provided via __ls-std-io__ module, a definition of this
   standard can be found in the libraries __doc__ folder
+- a base Exception class has been added, which provides basic reflection functionality - all existing library exceptions
+  inherit from this class now
 
 #### Improvements ####
 

+ 3 - 7
include/ls-std/core/exception/EventNotHandledException.hpp

@@ -3,20 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #ifndef LS_STD_EVENT_NOT_HANDLED_EXCEPTION_HPP
 #define LS_STD_EVENT_NOT_HANDLED_EXCEPTION_HPP
 
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL EventNotHandledException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL EventNotHandledException : public ls::std::core::Exception
   {
     public:
 
@@ -25,10 +25,6 @@ namespace ls::std::core
       ~EventNotHandledException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 3 - 7
include/ls-std/core/exception/EventNotSubscribedException.hpp

@@ -3,20 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #ifndef LS_STD_EVENT_NOT_SUBSCRIBED_EXCEPTION_HPP
 #define LS_STD_EVENT_NOT_SUBSCRIBED_EXCEPTION_HPP
 
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL EventNotSubscribedException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL EventNotSubscribedException : public ls::std::core::Exception
   {
     public:
 
@@ -25,10 +25,6 @@ namespace ls::std::core
       ~EventNotSubscribedException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 36 - 0
include/ls-std/core/exception/Exception.hpp

@@ -0,0 +1,36 @@
+/*
+* Author:          Patrick-Christopher Mattulat
+* Company:         Lynar Studios
+* E-Mail:          webmaster@lynarstudios.com
+* Created:         2023-02-22
+* Changed:         2023-02-22
+*
+* */
+
+#ifndef LS_STD_EXCEPTION_HPP
+#define LS_STD_EXCEPTION_HPP
+
+#include <exception>
+#include <ls-std/os/dynamic-goal.hpp>
+#include <string>
+
+namespace ls::std::core
+{
+  class LS_STD_DYNAMIC_GOAL Exception : public ::std::exception
+  {
+    public:
+
+      explicit Exception(::std::string _name);
+      ~Exception() override;
+
+      [[nodiscard]] ::std::string getName() const;
+      [[nodiscard]] const char *what() const noexcept override;
+
+    protected:
+
+      ::std::string message{};
+      ::std::string name{};
+  };
+}
+
+#endif

+ 3 - 8
include/ls-std/core/exception/FileNotFoundException.hpp

@@ -3,21 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #ifndef LS_STD_FILE_NOT_FOUND_EXCEPTION_HPP
 #define LS_STD_FILE_NOT_FOUND_EXCEPTION_HPP
 
-#include <cstring>
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL FileNotFoundException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL FileNotFoundException : public ls::std::core::Exception
   {
     public:
 
@@ -26,10 +25,6 @@ namespace ls::std::core
       ~FileNotFoundException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 3 - 7
include/ls-std/core/exception/FileOperationException.hpp

@@ -3,20 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #ifndef LS_STD_FILE_OPERATION_EXCEPTION_HPP
 #define LS_STD_FILE_OPERATION_EXCEPTION_HPP
 
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL FileOperationException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL FileOperationException : public ls::std::core::Exception
   {
     public:
 
@@ -25,10 +25,6 @@ namespace ls::std::core
       ~FileOperationException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 3 - 7
include/ls-std/core/exception/IllegalArgumentException.hpp

@@ -3,20 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #ifndef LS_STD_ILLEGAL_ARGUMENT_EXCEPTION_HPP
 #define LS_STD_ILLEGAL_ARGUMENT_EXCEPTION_HPP
 
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL IllegalArgumentException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL IllegalArgumentException : public ls::std::core::Exception
   {
     public:
 
@@ -25,10 +25,6 @@ namespace ls::std::core
       ~IllegalArgumentException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 3 - 7
include/ls-std/core/exception/IllegalArithmeticOperationException.hpp

@@ -3,20 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #ifndef LS_STD_ILLEGAL_OPERATION_EXCEPTION_HPP
 #define LS_STD_ILLEGAL_OPERATION_EXCEPTION_HPP
 
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL IllegalArithmeticOperationException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL IllegalArithmeticOperationException : public ls::std::core::Exception
   {
     public:
 
@@ -25,10 +25,6 @@ namespace ls::std::core
       ~IllegalArithmeticOperationException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 3 - 7
include/ls-std/core/exception/IncompleteJsonException.hpp

@@ -3,20 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-04-30
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #ifndef LS_STD_INCOMPLETE_JSON_EXCEPTION_HPP
 #define LS_STD_INCOMPLETE_JSON_EXCEPTION_HPP
 
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL IncompleteJsonException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL IncompleteJsonException : public ls::std::core::Exception
   {
     public:
 
@@ -25,10 +25,6 @@ namespace ls::std::core
       ~IncompleteJsonException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 3 - 7
include/ls-std/core/exception/IndexOutOfBoundsException.hpp

@@ -3,20 +3,20 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-10
+* Changed:         2023-02-22
 *
 * */
 
 #ifndef LS_STD_INDEX_OUT_OF_BOUNDS_EXCEPTION_HPP
 #define LS_STD_INDEX_OUT_OF_BOUNDS_EXCEPTION_HPP
 
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL IndexOutOfBoundsException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL IndexOutOfBoundsException : public ls::std::core::Exception
   {
     public:
 
@@ -25,10 +25,6 @@ namespace ls::std::core
       ~IndexOutOfBoundsException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 3 - 7
include/ls-std/core/exception/NullPointerException.hpp

@@ -3,20 +3,20 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-06
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #ifndef LS_STD_NULL_POINTER_EXCEPTION_HPP
 #define LS_STD_NULL_POINTER_EXCEPTION_HPP
 
-#include <exception>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
 
 namespace ls::std::core
 {
-  class LS_STD_DYNAMIC_GOAL NullPointerException : public ::std::exception
+  class LS_STD_DYNAMIC_GOAL NullPointerException : public ls::std::core::Exception
   {
     public:
 
@@ -25,10 +25,6 @@ namespace ls::std::core
       ~NullPointerException() override;
 
       [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
   };
 }
 

+ 0 - 35
include/ls-std/core/exception/WrongCallException.hpp

@@ -1,35 +0,0 @@
-/*
-* Author:          Patrick-Christopher Mattulat
-* Company:         Lynar Studios
-* E-Mail:          webmaster@lynarstudios.com
-* Created:         2023-02-10
-* Changed:         2023-02-11
-*
-* */
-
-#ifndef LS_STD_WRONG_CALL_EXCEPTION_HPP
-#define LS_STD_WRONG_CALL_EXCEPTION_HPP
-
-#include <exception>
-#include <ls-std/os/dynamic-goal.hpp>
-#include <string>
-
-namespace ls::std::core
-{
-  class LS_STD_DYNAMIC_GOAL WrongCallException : public ::std::exception // TODO: remove, really makes no sense :D
-  {
-    public:
-
-      WrongCallException();
-      explicit WrongCallException(::std::string _message);
-      ~WrongCallException() override;
-
-      [[nodiscard]] const char *what() const noexcept override;
-
-    private:
-
-      ::std::string message{};
-  };
-}
-
-#endif

+ 2 - 2
include/ls-std/ls-std-core.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2022-05-13
- * Changed:         2023-02-13
+ * Changed:         2023-02-22
  *
  * */
 
@@ -17,6 +17,7 @@
 
 #include <ls-std/core/exception/EventNotHandledException.hpp>
 #include <ls-std/core/exception/EventNotSubscribedException.hpp>
+#include <ls-std/core/exception/Exception.hpp>
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 #include <ls-std/core/exception/FileNotFoundException.hpp>
 #include <ls-std/core/exception/FileOperationException.hpp>
@@ -25,7 +26,6 @@
 #include <ls-std/core/exception/IncompleteJsonException.hpp>
 #include <ls-std/core/exception/IndexOutOfBoundsException.hpp>
 #include <ls-std/core/exception/NullPointerException.hpp>
-#include <ls-std/core/exception/WrongCallException.hpp>
 
 #include <ls-std/core/interface/IBoxing.hpp>
 #include <ls-std/core/interface/IEncoding.hpp>

+ 8 - 5
source/ls-std/core/exception/EventNotHandledException.cpp

@@ -3,23 +3,26 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #include <ls-std/core/exception/EventNotHandledException.hpp>
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 
-ls::std::core::EventNotHandledException::EventNotHandledException() = default;
-
-ls::std::core::EventNotHandledException::EventNotHandledException(::std::string _message) : message(::std::move(_message))
+ls::std::core::EventNotHandledException::EventNotHandledException() : ls::std::core::Exception("EventNotHandledException")
 {}
 
+ls::std::core::EventNotHandledException::EventNotHandledException(::std::string _message) : ls::std::core::EventNotHandledException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::EventNotHandledException::~EventNotHandledException() = default;
 
 const char *ls::std::core::EventNotHandledException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "EventNotHandledException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

+ 8 - 5
source/ls-std/core/exception/EventNotSubscribedException.cpp

@@ -3,23 +3,26 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #include <ls-std/core/exception/EventNotSubscribedException.hpp>
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 
-ls::std::core::EventNotSubscribedException::EventNotSubscribedException() = default;
-
-ls::std::core::EventNotSubscribedException::EventNotSubscribedException(::std::string _message) : message(::std::move(_message))
+ls::std::core::EventNotSubscribedException::EventNotSubscribedException() : ls::std::core::Exception("EventNotSubscribedException")
 {}
 
+ls::std::core::EventNotSubscribedException::EventNotSubscribedException(::std::string _message) : ls::std::core::EventNotSubscribedException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::EventNotSubscribedException::~EventNotSubscribedException() = default;
 
 const char *ls::std::core::EventNotSubscribedException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "EventNotSubscribedException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

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

@@ -0,0 +1,25 @@
+/*
+* Author:          Patrick-Christopher Mattulat
+* Company:         Lynar Studios
+* E-Mail:          webmaster@lynarstudios.com
+* Created:         2023-02-22
+* Changed:         2023-02-22
+*
+* */
+
+#include <ls-std/core/exception/Exception.hpp>
+
+ls::std::core::Exception::Exception(::std::string _name) : name(::std::move(_name))
+{}
+
+ls::std::core::Exception::~Exception() = default;
+
+::std::string ls::std::core::Exception::getName() const
+{
+  return this->name;
+}
+
+const char *ls::std::core::Exception::what() const noexcept
+{
+  return "base exception class class in use - method not implemented!";
+}

+ 8 - 5
source/ls-std/core/exception/FileNotFoundException.cpp

@@ -3,23 +3,26 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 #include <ls-std/core/exception/FileNotFoundException.hpp>
 
-ls::std::core::FileNotFoundException::FileNotFoundException() = default;
-
-ls::std::core::FileNotFoundException::FileNotFoundException(::std::string _message) : message(::std::move(_message))
+ls::std::core::FileNotFoundException::FileNotFoundException() : ls::std::core::Exception("FileNotFoundException")
 {}
 
+ls::std::core::FileNotFoundException::FileNotFoundException(::std::string _message) : ls::std::core::FileNotFoundException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::FileNotFoundException::~FileNotFoundException() = default;
 
 const char *ls::std::core::FileNotFoundException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "FileNotFoundException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

+ 8 - 5
source/ls-std/core/exception/FileOperationException.cpp

@@ -3,23 +3,26 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 #include <ls-std/core/exception/FileOperationException.hpp>
 
-ls::std::core::FileOperationException::FileOperationException() = default;
-
-ls::std::core::FileOperationException::FileOperationException(::std::string _message) : message(::std::move(_message))
+ls::std::core::FileOperationException::FileOperationException() : ls::std::core::Exception("FileOperationException")
 {}
 
+ls::std::core::FileOperationException::FileOperationException(::std::string _message) : ls::std::core::FileOperationException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::FileOperationException::~FileOperationException() = default;
 
 const char *ls::std::core::FileOperationException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "FileOperationException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

+ 8 - 5
source/ls-std/core/exception/IllegalArgumentException.cpp

@@ -3,23 +3,26 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 #include <ls-std/core/exception/IllegalArgumentException.hpp>
 
-ls::std::core::IllegalArgumentException::IllegalArgumentException() = default;
-
-ls::std::core::IllegalArgumentException::IllegalArgumentException(::std::string _message) : message(::std::move(_message))
+ls::std::core::IllegalArgumentException::IllegalArgumentException() : ls::std::core::Exception("IllegalArgumentException")
 {}
 
+ls::std::core::IllegalArgumentException::IllegalArgumentException(::std::string _message) : ls::std::core::IllegalArgumentException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::IllegalArgumentException::~IllegalArgumentException() = default;
 
 const char *ls::std::core::IllegalArgumentException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "IllegalArgumentException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

+ 8 - 5
source/ls-std/core/exception/IllegalArithmeticOperationException.cpp

@@ -3,23 +3,26 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 #include <ls-std/core/exception/IllegalArithmeticOperationException.hpp>
 
-ls::std::core::IllegalArithmeticOperationException::IllegalArithmeticOperationException() = default;
-
-ls::std::core::IllegalArithmeticOperationException::IllegalArithmeticOperationException(::std::string _message) : message(::std::move(_message))
+ls::std::core::IllegalArithmeticOperationException::IllegalArithmeticOperationException() : ls::std::core::Exception("IllegalArithmeticOperationException")
 {}
 
+ls::std::core::IllegalArithmeticOperationException::IllegalArithmeticOperationException(::std::string _message) : ls::std::core::IllegalArithmeticOperationException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::IllegalArithmeticOperationException::~IllegalArithmeticOperationException() = default;
 
 const char *ls::std::core::IllegalArithmeticOperationException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "IllegalArithmeticOperationException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

+ 8 - 5
source/ls-std/core/exception/IncompleteJsonException.cpp

@@ -3,23 +3,26 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 #include <ls-std/core/exception/IncompleteJsonException.hpp>
 
-ls::std::core::IncompleteJsonException::IncompleteJsonException() = default;
-
-ls::std::core::IncompleteJsonException::IncompleteJsonException(::std::string _message) : message(::std::move(_message))
+ls::std::core::IncompleteJsonException::IncompleteJsonException() : ls::std::core::Exception("IncompleteJsonException")
 {}
 
+ls::std::core::IncompleteJsonException::IncompleteJsonException(::std::string _message) : ls::std::core::IncompleteJsonException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::IncompleteJsonException::~IncompleteJsonException() = default;
 
 const char *ls::std::core::IncompleteJsonException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "IncompleteJsonException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

+ 8 - 5
source/ls-std/core/exception/IndexOutOfBoundsException.cpp

@@ -3,23 +3,26 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-10
+* Changed:         2023-02-22
 *
 * */
 
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 #include <ls-std/core/exception/IndexOutOfBoundsException.hpp>
 
-ls::std::core::IndexOutOfBoundsException::IndexOutOfBoundsException() = default;
-
-ls::std::core::IndexOutOfBoundsException::IndexOutOfBoundsException(::std::string _message) : message(::std::move(_message))
+ls::std::core::IndexOutOfBoundsException::IndexOutOfBoundsException() : ls::std::core::Exception("IndexOutOfBoundsException")
 {}
 
+ls::std::core::IndexOutOfBoundsException::IndexOutOfBoundsException(::std::string _message) : ls::std::core::IndexOutOfBoundsException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::IndexOutOfBoundsException::~IndexOutOfBoundsException() = default;
 
 const char *ls::std::core::IndexOutOfBoundsException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "IndexOutOfBoundsException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

+ 8 - 5
source/ls-std/core/exception/NullPointerException.cpp

@@ -3,23 +3,26 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
 #include <ls-std/core/exception/ExceptionMessage.hpp>
 #include <ls-std/core/exception/NullPointerException.hpp>
 
-ls::std::core::NullPointerException::NullPointerException() = default;
-
-ls::std::core::NullPointerException::NullPointerException(::std::string _message) : message(::std::move(_message))
+ls::std::core::NullPointerException::NullPointerException() : ls::std::core::Exception("NullPointerException")
 {}
 
+ls::std::core::NullPointerException::NullPointerException(::std::string _message) : ls::std::core::NullPointerException()
+{
+  this->message = ::std::move(_message);
+}
+
 ls::std::core::NullPointerException::~NullPointerException() = default;
 
 const char *ls::std::core::NullPointerException::what() const noexcept
 {
-  ::std::string concatenatedMessage = "NullPointerException thrown - ";
+  ::std::string concatenatedMessage = this->name + " thrown - ";
 
   if (this->message.empty())
   {

+ 0 - 34
source/ls-std/core/exception/WrongCallException.cpp

@@ -1,34 +0,0 @@
-/*
-* Author:          Patrick-Christopher Mattulat
-* Company:         Lynar Studios
-* E-Mail:          webmaster@lynarstudios.com
-* Created:         2023-02-10
-* Changed:         2023-02-10
-*
-* */
-
-#include <ls-std/core/exception/WrongCallException.hpp>
-#include <ls-std/core/exception/ExceptionMessage.hpp>
-
-ls::std::core::WrongCallException::WrongCallException() = default;
-
-ls::std::core::WrongCallException::WrongCallException(::std::string _message) : message(::std::move(_message))
-{}
-
-ls::std::core::WrongCallException::~WrongCallException() = default;
-
-const char *ls::std::core::WrongCallException::what() const noexcept
-{
-  ::std::string concatenatedMessage = "WrongCallException thrown - ";
-
-  if (this->message.empty())
-  {
-    concatenatedMessage = concatenatedMessage + "this function / method call is invalid!";
-  }
-  else
-  {
-    concatenatedMessage = concatenatedMessage + this->message;
-  }
-
-  return ExceptionMessage{concatenatedMessage}.toCharacterPointer();
-}

+ 9 - 5
test/cases/core/evaluator/EmptyStringArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-02-08
+* Changed:         2023-02-22
 *
 * */
 
@@ -40,8 +40,10 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string message = _exception.what();
-            ASSERT_STREQ("IllegalArgumentException thrown - passed argument is empty!", message.c_str());
+            string actual = _exception.what();
+            string expected = _exception.getName() + " thrown - passed argument is empty!";
+
+            ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -58,8 +60,10 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string message = _exception.what();
-            ASSERT_STREQ("IllegalArgumentException thrown - this id is empty!", message.c_str());
+            string actual = _exception.what();
+            string expected = _exception.getName() + " thrown - this id is empty!";
+
+            ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },

+ 9 - 5
test/cases/core/evaluator/IndexOutOfBoundsEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-10
+* Changed:         2023-02-22
 *
 * */
 
@@ -40,8 +40,10 @@ namespace
           }
           catch (const IndexOutOfBoundsException &_exception)
           {
-            string message = _exception.what();
-            ASSERT_STREQ("IndexOutOfBoundsException thrown - provided index is out of bounds!", message.c_str());
+            string actual = _exception.what();
+            string expected = _exception.getName() + " thrown - provided index is out of bounds!";
+
+            ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -58,8 +60,10 @@ namespace
           }
           catch (const IndexOutOfBoundsException &_exception)
           {
-            string message = _exception.what();
-            ASSERT_STREQ("IndexOutOfBoundsException thrown - index 3 is not in range of the containers size, which is 2!", message.c_str());
+            string actual = _exception.what();
+            string expected = _exception.getName() + " thrown - index 3 is not in range of the containers size, which is 2!";
+
+            ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },

+ 9 - 5
test/cases/core/evaluator/NullPointerArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-02-08
+* Changed:         2023-02-22
 *
 * */
 
@@ -40,8 +40,10 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string message = _exception.what();
-            ASSERT_STREQ("IllegalArgumentException thrown - passed argument is null!", message.c_str());
+            string actual = _exception.what();
+            string expected = _exception.getName() + " thrown - passed argument is null!";
+
+            ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -58,8 +60,10 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string message = _exception.what();
-            ASSERT_STREQ("IllegalArgumentException thrown - this reference is null!", message.c_str());
+            string actual = _exception.what();
+            string expected = _exception.getName() + " thrown - this reference is null!";
+
+            ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },

+ 9 - 5
test/cases/core/evaluator/NullPointerEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-02-08
+* Changed:         2023-02-22
 *
 * */
 
@@ -40,8 +40,10 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string message = _exception.what();
-            ASSERT_STREQ("NullPointerException thrown - reference in use is null!", message.c_str());
+            string actual = _exception.what();
+            string expected = _exception.getName() + " thrown - reference in use is null!";
+
+            ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -58,8 +60,10 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string message = _exception.what();
-            ASSERT_STREQ("NullPointerException thrown - this reference is not set and causes this exception!", message.c_str());
+            string actual = _exception.what();
+            string expected = _exception.getName() + " thrown - this reference is not set and causes this exception!";
+
+            ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },

+ 14 - 5
test/cases/core/exception/EventNotHandledExceptionTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const EventNotHandledException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("EventNotHandledException thrown - event was not handled - nothing happened!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - event was not handled - nothing happened!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const EventNotHandledException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("EventNotHandledException thrown - id: OPEN_DOOR", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - id: OPEN_DOOR";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         EventNotHandledException);
   }
+
+  TEST_F(EventNotHandledExceptionTest, getName)
+  {
+    ASSERT_STREQ("EventNotHandledException", EventNotHandledException{}.getName().c_str());
+  }
 }

+ 14 - 5
test/cases/core/exception/EventNotSubscribedExceptionTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const EventNotSubscribedException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("EventNotSubscribedException thrown - event was not subscribed!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - event was not subscribed!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const EventNotSubscribedException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("EventNotSubscribedException thrown - id: OPEN_DOOR", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - id: OPEN_DOOR";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         EventNotSubscribedException);
   }
+
+  TEST_F(EventNotSubscribedExceptionTest, getName)
+  {
+    ASSERT_STREQ("EventNotSubscribedException", EventNotSubscribedException{}.getName().c_str());
+  }
 }

+ 14 - 5
test/cases/core/exception/FileNotFoundExceptionTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const FileNotFoundException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("FileNotFoundException thrown - file not found!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - file not found!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const FileNotFoundException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ(R"(FileNotFoundException thrown - "settings.txt" not found!)", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + R"( thrown - "settings.txt" not found!)";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         FileNotFoundException);
   }
+
+  TEST_F(FileNotFoundExceptionTest, getName)
+  {
+    ASSERT_STREQ("FileNotFoundException", FileNotFoundException{}.getName().c_str());
+  }
 }

+ 14 - 5
test/cases/core/exception/FileOperationExceptionTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const FileOperationException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("FileOperationException thrown - file operation failed!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - file operation failed!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const FileOperationException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ(R"(FileOperationException thrown - creating directory "tmp")", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + R"( thrown - creating directory "tmp")";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         FileOperationException);
   }
+
+  TEST_F(FileOperationExceptionTest, getName)
+  {
+    ASSERT_STREQ("FileOperationException", FileOperationException{}.getName().c_str());
+  }
 }

+ 14 - 5
test/cases/core/exception/IllegalArgumentExceptionTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("IllegalArgumentException thrown - passed argument is not valid!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - passed argument is not valid!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("IllegalArgumentException thrown - value is empty", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - value is empty";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         IllegalArgumentException);
   }
+
+  TEST_F(IllegalArgumentExceptionTest, getName)
+  {
+    ASSERT_STREQ("IllegalArgumentException", IllegalArgumentException{}.getName().c_str());
+  }
 }

+ 14 - 5
test/cases/core/exception/IllegalArithmeticOperationExceptionTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const IllegalArithmeticOperationException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("IllegalArithmeticOperationException thrown - arithmetic operation is not allowed!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - arithmetic operation is not allowed!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const IllegalArithmeticOperationException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("IllegalArithmeticOperationException thrown - division by zero", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - division by zero";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         IllegalArithmeticOperationException);
   }
+
+  TEST_F(IllegalArithmeticOperationExceptionTest, getName)
+  {
+    ASSERT_STREQ("IllegalArithmeticOperationException", IllegalArithmeticOperationException{}.getName().c_str());
+  }
 }

+ 14 - 5
test/cases/core/exception/IncompleteJsonExceptionTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const IncompleteJsonException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("IncompleteJsonException thrown - this JSON string is incomplete.", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - this JSON string is incomplete.";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const IncompleteJsonException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("IncompleteJsonException thrown - incomplete: {\"name\":\"}", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - incomplete: {\"name\":\"}";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         IncompleteJsonException);
   }
+
+  TEST_F(IncompleteJsonExceptionTest, getName)
+  {
+    ASSERT_STREQ("IncompleteJsonException", IncompleteJsonException{}.getName().c_str());
+  }
 }

+ 14 - 5
test/cases/core/exception/IndexOutOfBoundsExceptionTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-10
+* Changed:         2023-02-22
 *
 * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const IndexOutOfBoundsException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("IndexOutOfBoundsException thrown - provided index is out of bounds!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - provided index is out of bounds!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const IndexOutOfBoundsException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("IndexOutOfBoundsException thrown - index 3 is out of bounds!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - index 3 is out of bounds!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         IndexOutOfBoundsException);
   }
+
+  TEST_F(IndexOutOfBoundsExceptionTest, getName)
+  {
+    ASSERT_STREQ("IndexOutOfBoundsException", IndexOutOfBoundsException{}.getName().c_str());
+  }
 }

+ 14 - 5
test/cases/core/exception/NullPointerExceptionTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-02-07
+ * Changed:         2023-02-22
  *
  * */
 
@@ -39,8 +39,10 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("NullPointerException thrown - reference is null!", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - reference is null!";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
@@ -57,11 +59,18 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            ::std::string message = _exception.what();
-            EXPECT_STREQ("NullPointerException thrown - _value is null", message.c_str());
+            ::std::string actual = _exception.what();
+            ::std::string expected = _exception.getName() + " thrown - _value is null";
+
+            EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
           }
         },
         NullPointerException);
   }
+
+  TEST_F(NullPointerExceptionTest, getName)
+  {
+    ASSERT_STREQ("NullPointerException", NullPointerException{"message"}.getName().c_str());
+  }
 }

+ 0 - 67
test/cases/core/exception/WrongCallExceptionTest.cpp

@@ -1,67 +0,0 @@
-/*
-* Author:          Patrick-Christopher Mattulat
-* Company:         Lynar Studios
-* E-Mail:          webmaster@lynarstudios.com
-* Created:         2023-02-10
-* Changed:         2023-02-10
-*
-* */
-
-#include <gtest/gtest.h>
-#include <ls-std/ls-std-core.hpp>
-#include <string>
-
-using namespace ls::std::core;
-
-namespace
-{
- class WrongCallExceptionTest : public ::testing::Test
- {
-   protected:
-
-     WrongCallExceptionTest() = default;
-     ~WrongCallExceptionTest() override = default;
-
-     void SetUp() override
-     {}
-
-     void TearDown() override
-     {}
- };
-
- TEST_F(WrongCallExceptionTest, constructor)
- {
-   EXPECT_THROW(
-       {
-         try
-         {
-           throw WrongCallException{};
-         }
-         catch (const WrongCallException &_exception)
-         {
-           ::std::string message = _exception.what();
-           EXPECT_STREQ("WrongCallException thrown - this function / method call is invalid!", message.c_str());
-           throw;
-         }
-       },
-       WrongCallException);
- }
-
- TEST_F(WrongCallExceptionTest, constructor_dedicated_message)
- {
-   EXPECT_THROW(
-       {
-         try
-         {
-           throw WrongCallException{"method \"getValue()\" was called, although this is forbidden!"};
-         }
-         catch (const WrongCallException &_exception)
-         {
-           ::std::string message = _exception.what();
-           EXPECT_STREQ("WrongCallException thrown - method \"getValue()\" was called, although this is forbidden!", message.c_str());
-           throw;
-         }
-       },
-       WrongCallException);
- }
-}

+ 2 - 2
test/cases/io/evaluator/FileExistenceEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-02-21
+* Changed:         2023-02-22
 *
 * */
 
@@ -43,7 +43,7 @@ namespace
           catch (const FileNotFoundException &_exception)
           {
             string actual = _exception.what();
-            string expected = "FileNotFoundException thrown - \"" + GetParam() + "\" does not exist!";
+            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" does not exist!";
             ;
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());

+ 2 - 2
test/cases/io/section-pair/evaluator/SectionPairIdentifierArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-09
-* Changed:         2023-02-20
+* Changed:         2023-02-22
 *
 * */
 
@@ -57,7 +57,7 @@ namespace
           catch (const IllegalArgumentException &_exception)
           {
             ::std::string actual = _exception.what();
-            ::std::string expected = "IllegalArgumentException thrown - \"" + GetParam() + "\" is not a valid identifier!";
+            ::std::string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid identifier!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 1 - 1
test/cases/io/section-pair/evaluator/SectionPairRowArgumentEvaluatorTest.cpp

@@ -57,7 +57,7 @@ namespace
           catch (const IllegalArgumentException &_exception)
           {
             ::std::string actual = _exception.what();
-            ::std::string expected = "IllegalArgumentException thrown - \"" + GetParam() + "\" is not a valid section pair row!";
+            ::std::string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair row!";
 
             ASSERT_STREQ(SectionPairMessageFormatter::getFormattedMessage(expected).c_str(), actual.c_str());
             throw;

+ 1 - 1
test/cases/io/section-pair/evaluator/SectionPairRowListValueArgumentEvaluatorTest.cpp

@@ -57,7 +57,7 @@ namespace
           catch (const IllegalArgumentException &_exception)
           {
             ::std::string actual = _exception.what();
-            ::std::string expected = "IllegalArgumentException thrown - \"" + GetParam() + "\" is not a valid section pair list value row!";
+            ::std::string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair list value row!";
 
             ASSERT_STREQ(SectionPairMessageFormatter::getFormattedMessage(expected).c_str(), actual.c_str());
             throw;

+ 1 - 1
test/cases/io/section-pair/evaluator/SectionPairRowSingleValueArgumentEvaluatorTest.cpp

@@ -57,7 +57,7 @@ namespace
           catch (const IllegalArgumentException &_exception)
           {
             ::std::string actual = _exception.what();
-            ::std::string expected = "IllegalArgumentException thrown - \"" + GetParam() + "\" is not a valid section pair single value row!";
+            ::std::string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair single value row!";
 
             ASSERT_STREQ(SectionPairMessageFormatter::getFormattedMessage(expected).c_str(), actual.c_str());
             throw;

+ 1 - 1
test/cases/io/section-pair/evaluator/SectionPairSectionArgumentEvaluatorTest.cpp

@@ -57,7 +57,7 @@ namespace
           catch (const IllegalArgumentException &_exception)
           {
             ::std::string actual = _exception.what();
-            ::std::string expected = "IllegalArgumentException thrown - \"" + GetParam() + "\" is not a valid section!";
+            ::std::string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section!";
 
             ASSERT_STREQ(SectionPairMessageFormatter::getFormattedMessage(expected).c_str(), actual.c_str());
             throw;

+ 2 - 2
test/cases/io/section-pair/evaluator/SectionPairValueArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-20
+* Changed:         2023-02-22
 *
 * */
 
@@ -57,7 +57,7 @@ namespace
           catch (const IllegalArgumentException &_exception)
           {
             ::std::string actual = _exception.what();
-            ::std::string expected = "IllegalArgumentException thrown - \"" + GetParam() + "\" is not a valid value!";
+            ::std::string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid value!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 2 - 2
test/cases/io/section-pair/reader/SectionPairFileReaderTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-02-21
+* Changed:         2023-02-22
 *
 * */
 
@@ -99,7 +99,7 @@ namespace
           catch (const IllegalArgumentException &_exception)
           {
             string message = _exception.what();
-            string expected = "IllegalArgumentException thrown - \"" + GetParam() + "\" does not have a valid section pair file extension (.txt or .sp)!";
+            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" does not have a valid section pair file extension (.txt or .sp)!";
 
             ASSERT_STREQ(expected.c_str(), message.c_str());
             throw;