Cleanup exceptions.
[command.git] / include / exception / missingRequiredParameter.h
1 #ifndef __COMMAND_EXCEPTION_MISSING_REQUIRED_PARAMETER_H
2 #define __COMMAND_EXCEPTION_MISSING_REQUIRED_PARAMETER_H
3
4 #include <stdexcept>
5 #include <string>
6
7 namespace command {
8
9 /**
10  * Exception thrown when required argument was not set
11  */
12 class MissingRequiredParameter : public std::logic_error {
13 public:
14     /** \inheritdoc */
15     explicit MissingRequiredParameter(const std::string& what_arg) :
16         std::logic_error(what_arg) { }
17
18     /** \inheritdoc */
19     explicit MissingRequiredParameter(const char* what_arg) :
20         std::logic_error(what_arg) { }
21 };
22
23 }
24
25 #endif /* __COMMAND_EXCEPTION_MISSING_REQUIRED_PARAMETER_H */