Handle missing equal sign for Options with values.
[command.git] / include / exception / optionValueNotSpecified.h
1 #ifndef __COMMAND_EXCEPTION_OPTION_VALUE_NOT_SPECIFIED_H
2 #define __COMMAND_EXCEPTION_OPTION_VALUE_NOT_SPECIFIED_H
3
4 #include <stdexcept>
5 #include <string>
6
7 namespace command {
8
9 /**
10  * Exception thrown when Option should have value, but no equal sign specifying
11  * it has been set
12  */
13 class OptionValueNotSpecified : public std::invalid_argument {
14 public:
15     /** \inheritdoc */
16     explicit OptionValueNotSpecified(const std::string& what_arg) :
17         std::invalid_argument(what_arg) { }
18
19     /** \inheritdoc */
20     explicit OptionValueNotSpecified(const char* what_arg) :
21         std::invalid_argument(what_arg) { }
22 };
23
24 }
25
26 #endif /* __COMMAND_EXCEPTION_OPTION_VALUE_NOT_SPECIFIED_H */