Exception.hpp 734 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-22
  6. * Changed: 2023-02-22
  7. *
  8. * */
  9. #ifndef LS_STD_EXCEPTION_HPP
  10. #define LS_STD_EXCEPTION_HPP
  11. #include <exception>
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. #include <string>
  14. namespace ls::std::core
  15. {
  16. class LS_STD_DYNAMIC_GOAL Exception : public ::std::exception
  17. {
  18. public:
  19. explicit Exception(::std::string _name);
  20. ~Exception() noexcept override;
  21. [[nodiscard]] ::std::string getName() const;
  22. [[nodiscard]] const char *what() const noexcept override;
  23. protected:
  24. ::std::string message{};
  25. ::std::string name{};
  26. };
  27. }
  28. #endif