Эх сурвалжийг харах

Add base Exception class to existing library exception classes

This class inherits ::std::exception and provides basic reflection.
Patrick-Christopher Mattulat 1 жил өмнө
parent
commit
fe5979557e
31 өөрчлөгдсөн 217 нэмэгдсэн , 119 устгасан
  1. 1 0
      CMakeLists.txt
  2. 3 7
      include/ls-std/core/exception/EventNotHandledException.hpp
  3. 3 7
      include/ls-std/core/exception/EventNotSubscribedException.hpp
  4. 36 0
      include/ls-std/core/exception/Exception.hpp
  5. 3 8
      include/ls-std/core/exception/FileNotFoundException.hpp
  6. 3 7
      include/ls-std/core/exception/FileOperationException.hpp
  7. 3 7
      include/ls-std/core/exception/IllegalArgumentException.hpp
  8. 3 7
      include/ls-std/core/exception/IllegalArithmeticOperationException.hpp
  9. 3 7
      include/ls-std/core/exception/IncompleteJsonException.hpp
  10. 3 7
      include/ls-std/core/exception/IndexOutOfBoundsException.hpp
  11. 3 7
      include/ls-std/core/exception/NullPointerException.hpp
  12. 2 1
      include/ls-std/ls-std-core.hpp
  13. 8 5
      source/ls-std/core/exception/EventNotHandledException.cpp
  14. 8 5
      source/ls-std/core/exception/EventNotSubscribedException.cpp
  15. 25 0
      source/ls-std/core/exception/Exception.cpp
  16. 8 5
      source/ls-std/core/exception/FileNotFoundException.cpp
  17. 8 5
      source/ls-std/core/exception/FileOperationException.cpp
  18. 8 5
      source/ls-std/core/exception/IllegalArgumentException.cpp
  19. 8 5
      source/ls-std/core/exception/IllegalArithmeticOperationException.cpp
  20. 8 5
      source/ls-std/core/exception/IncompleteJsonException.cpp
  21. 8 5
      source/ls-std/core/exception/IndexOutOfBoundsException.cpp
  22. 8 5
      source/ls-std/core/exception/NullPointerException.cpp
  23. 6 1
      test/cases/core/exception/EventNotHandledExceptionTest.cpp
  24. 6 1
      test/cases/core/exception/EventNotSubscribedExceptionTest.cpp
  25. 6 1
      test/cases/core/exception/FileNotFoundExceptionTest.cpp
  26. 6 1
      test/cases/core/exception/FileOperationExceptionTest.cpp
  27. 6 1
      test/cases/core/exception/IllegalArgumentExceptionTest.cpp
  28. 6 1
      test/cases/core/exception/IllegalArithmeticOperationExceptionTest.cpp
  29. 6 1
      test/cases/core/exception/IncompleteJsonExceptionTest.cpp
  30. 6 1
      test/cases/core/exception/IndexOutOfBoundsExceptionTest.cpp
  31. 6 1
      test/cases/core/exception/NullPointerExceptionTest.cpp

+ 1 - 0
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

+ 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();
+      [[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{};
   };
 }
 

+ 2 - 1
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>

+ 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()
+{
+  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())
   {

+ 6 - 1
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
  *
  * */
 
@@ -64,4 +64,9 @@ namespace
         },
         EventNotHandledException);
   }
+
+  TEST_F(EventNotHandledExceptionTest, getName)
+  {
+    ASSERT_STREQ("EventNotHandledException", EventNotHandledException{}.getName().c_str());
+  }
 }

+ 6 - 1
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
  *
  * */
 
@@ -64,4 +64,9 @@ namespace
         },
         EventNotSubscribedException);
   }
+
+  TEST_F(EventNotSubscribedExceptionTest, getName)
+  {
+    ASSERT_STREQ("EventNotSubscribedException", EventNotSubscribedException{}.getName().c_str());
+  }
 }

+ 6 - 1
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
  *
  * */
 
@@ -64,4 +64,9 @@ namespace
         },
         FileNotFoundException);
   }
+
+  TEST_F(FileNotFoundExceptionTest, getName)
+  {
+    ASSERT_STREQ("FileNotFoundException", FileNotFoundException{}.getName().c_str());
+  }
 }

+ 6 - 1
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
  *
  * */
 
@@ -64,4 +64,9 @@ namespace
         },
         FileOperationException);
   }
+
+  TEST_F(FileOperationExceptionTest, getName)
+  {
+    ASSERT_STREQ("FileOperationException", FileOperationException{}.getName().c_str());
+  }
 }

+ 6 - 1
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
  *
  * */
 
@@ -64,4 +64,9 @@ namespace
         },
         IllegalArgumentException);
   }
+
+  TEST_F(IllegalArgumentExceptionTest, getName)
+  {
+    ASSERT_STREQ("IllegalArgumentException", IllegalArgumentException{}.getName().c_str());
+  }
 }

+ 6 - 1
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
  *
  * */
 
@@ -64,4 +64,9 @@ namespace
         },
         IllegalArithmeticOperationException);
   }
+
+  TEST_F(IllegalArithmeticOperationExceptionTest, getName)
+  {
+    ASSERT_STREQ("IllegalArithmeticOperationException", IllegalArithmeticOperationException{}.getName().c_str());
+  }
 }

+ 6 - 1
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
  *
  * */
 
@@ -64,4 +64,9 @@ namespace
         },
         IncompleteJsonException);
   }
+
+  TEST_F(IncompleteJsonExceptionTest, getName)
+  {
+    ASSERT_STREQ("IncompleteJsonException", IncompleteJsonException{}.getName().c_str());
+  }
 }

+ 6 - 1
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
 *
 * */
 
@@ -64,4 +64,9 @@ namespace
         },
         IndexOutOfBoundsException);
   }
+
+  TEST_F(IndexOutOfBoundsExceptionTest, getName)
+  {
+    ASSERT_STREQ("IndexOutOfBoundsException", IndexOutOfBoundsException{}.getName().c_str());
+  }
 }

+ 6 - 1
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
  *
  * */
 
@@ -64,4 +64,9 @@ namespace
         },
         NullPointerException);
   }
+
+  TEST_F(NullPointerExceptionTest, getName)
+  {
+    ASSERT_STREQ("NullPointerException", NullPointerException{"message"}.getName().c_str());
+  }
 }