12345678910111213141516171819202122232425262728293031323334 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2023-02-04
- * Changed: 2023-02-07
- *
- * */
- #include <ls-std/core/exception/ExceptionMessage.hpp>
- #include <ls-std/core/exception/IncompleteJsonException.hpp>
- ls::std::core::IncompleteJsonException::IncompleteJsonException() = default;
- ls::std::core::IncompleteJsonException::IncompleteJsonException(::std::string _message) : message(::std::move(_message))
- {}
- ls::std::core::IncompleteJsonException::~IncompleteJsonException() = default;
- const char *ls::std::core::IncompleteJsonException::what() const noexcept
- {
- ::std::string concatenatedMessage = "IncompleteJsonException thrown - ";
- if (this->message.empty())
- {
- concatenatedMessage = concatenatedMessage + "this JSON string is incomplete.";
- }
- else
- {
- concatenatedMessage = concatenatedMessage + this->message;
- }
- return ExceptionMessage{concatenatedMessage}.toCharacterPointer();
- }
|