* Retrieves the user provided option */
| 18 | * Retrieves the user provided option |
| 19 | */ |
| 20 | std::string GetSpecifiedOption(const std::map<std::string, std::string>& options, const std::string& option) |
| 21 | { |
| 22 | if (CheckOptionSpecified(options, option)){ |
| 23 | return options.at(option); |
| 24 | } |
| 25 | else |
| 26 | { |
| 27 | throw std::invalid_argument("Required option: " + option + " not defined."); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | /* |
| 32 | * Parses all the command line options provided by the user and stores in a map. |
no test coverage detected