Cleanup exceptions.
[command.git] / include / exception / missingOptionValue.h
1 #ifndef __COMMAND_EXCEPTION_MISSING_OPTION_VALUE_H
2 #define __COMMAND_EXCEPTION_MISSING_OPTION_VALUE_H
3
4 #include <stdexcept>
5 #include <string>
6
7 namespace command {
8
9 /**
10  * Exception thrown used when Option should have value, but no one has been set
11  */
12 class MissingOptionValue : public std::invalid_argument {
13 public:
14     /** \inheritdoc */
15     explicit MissingOptionValue(const std::string& what_arg) :
16         std::invalid_argument(what_arg) { }
17
18     /** \inheritdoc */
19     explicit MissingOptionValue(const char* what_arg) :
20         std::invalid_argument(what_arg) { }
21 };
22
23 }
24
25 #endif /* __COMMAND_EXCEPTION_MISSING_OPTION_VALUE_H */