| 1234567891011121314151617181920212223242526272829303132333435363738 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Co-Author: Claude Sonnet 4.6 (LLM)
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2023-02-08
- * Changed: 2026-06-23
- *
- * */
- #include <ls-std/core/evaluator/EmptyStringArgumentEvaluator.hpp>
- #include <ls-std/core/exception/IllegalArgumentException.hpp>
- using ls::standard::core::EmptyStringArgumentEvaluator;
- using ls::standard::core::IllegalArgumentException;
- using std::move;
- using std::string;
- EmptyStringArgumentEvaluator::EmptyStringArgumentEvaluator(string _argument) : argument(::move(_argument))
- {}
- EmptyStringArgumentEvaluator::EmptyStringArgumentEvaluator(string _argument, string _message) : argument(::move(_argument)), message(::move(_message))
- {}
- EmptyStringArgumentEvaluator::~EmptyStringArgumentEvaluator() noexcept = default;
- void EmptyStringArgumentEvaluator::evaluate()
- {
- if (this->argument.empty())
- {
- if (this->message.empty())
- {
- throw IllegalArgumentException{"passed argument is empty!"};
- }
- throw IllegalArgumentException{this->message};
- }
- }
|