IndexOutOfBoundsException.cpp 890 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-10
  6. * Changed: 2023-03-28
  7. *
  8. * */
  9. #include <ls-std/core/exception/ExceptionMessage.hpp>
  10. #include <ls-std/core/exception/IndexOutOfBoundsException.hpp>
  11. using ls::std::core::Exception;
  12. using ls::std::core::IndexOutOfBoundsException;
  13. using std::move;
  14. using std::string;
  15. IndexOutOfBoundsException::IndexOutOfBoundsException() : Exception("IndexOutOfBoundsException")
  16. {}
  17. IndexOutOfBoundsException::IndexOutOfBoundsException(string _message) : IndexOutOfBoundsException()
  18. {
  19. this->message = ::move(_message);
  20. }
  21. IndexOutOfBoundsException::~IndexOutOfBoundsException() noexcept = default;
  22. const char *IndexOutOfBoundsException::what() const noexcept
  23. {
  24. return this->_getIdentifiedMessage("provided index is out of bounds!");
  25. }