NullPointerException.cpp 776 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-04
  6. * Changed: 2025-12-21
  7. *
  8. * */
  9. #include <ls-std/core/exception/NullPointerException.hpp>
  10. using ls::std::core::Exception;
  11. using ls::std::core::NullPointerException;
  12. using std::move;
  13. using std::string;
  14. NullPointerException::NullPointerException() : Exception("NullPointerException")
  15. {}
  16. NullPointerException::NullPointerException(const string &_message) : NullPointerException()
  17. {
  18. this->_setMessage(_message);
  19. }
  20. NullPointerException::~NullPointerException() noexcept = default;
  21. const char *NullPointerException::what() const noexcept
  22. {
  23. return this->_getIdentifiedMessage("reference is null!");
  24. }