X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=include%2Fexception%2FmissingOptionValue.h;h=15d9313d97bed76c192347bca708b8ba4da65202;hb=e516b9282a0d716b8770bdf58af13cfe0843fa92;hp=c3050054b4e1810f395e70e10beffcc027ab633d;hpb=1db559f7394bb6384c7f9dddc8de3927bcb263c5;p=command.git diff --git a/include/exception/missingOptionValue.h b/include/exception/missingOptionValue.h index c305005..15d9313 100644 --- a/include/exception/missingOptionValue.h +++ b/include/exception/missingOptionValue.h @@ -7,21 +7,17 @@ namespace command { /** - * Helper template class used for releasing resources. + * Exception thrown used when Option should have value, but no one has been set */ class MissingOptionValue : public std::invalid_argument { -private: - std::string message; public: + /** \inheritdoc */ explicit MissingOptionValue(const std::string& what_arg) : - std::invalid_argument(what_arg), message(what_arg) { } + std::invalid_argument(what_arg) { } + /** \inheritdoc */ explicit MissingOptionValue(const char* what_arg) : - std::invalid_argument(what_arg), message(what_arg) { } - - virtual const char* what() const throw() { - return message.c_str(); - } + std::invalid_argument(what_arg) { } }; }