NullPointerException.hpp 590 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-11-06
  6. * Changed: 2020-11-06
  7. *
  8. * */
  9. #ifndef LS_STD_NULL_POINTER_EXCEPTION_HPP
  10. #define LS_STD_NULL_POINTER_EXCEPTION_HPP
  11. #include <exception>
  12. namespace ls_std {
  13. class NullPointerException : public std::exception {
  14. public:
  15. explicit NullPointerException() = default;
  16. const char *what() const noexcept override {
  17. return "NullPointerException thrown - reference is null!";
  18. }
  19. };
  20. }
  21. #endif