NullPointerException.hpp 934 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-11-06
  6. * Changed: 2024-09-11
  7. *
  8. * */
  9. #ifndef LS_STD_NULL_POINTER_EXCEPTION_HPP
  10. #define LS_STD_NULL_POINTER_EXCEPTION_HPP
  11. #include <ls-std/core/exception/Exception.hpp>
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. #include <string>
  14. /*
  15. * @doc: class(name: 'NullPointerException', package: 'core')
  16. * @doc: core.NullPointerException.description('This exception can be thrown in case a called reference is null.')
  17. * */
  18. namespace ls::std::core
  19. {
  20. class LS_STD_DYNAMIC_GOAL NullPointerException : public ls::std::core::Exception
  21. {
  22. public:
  23. NullPointerException();
  24. explicit NullPointerException(const ::std::string &_message);
  25. ~NullPointerException() noexcept override;
  26. [[nodiscard]] const char *what() const noexcept override;
  27. };
  28. }
  29. #endif