| 269 | } |
| 270 | |
| 271 | void Config::validateAndThrow() |
| 272 | { |
| 273 | auto r = validate(); |
| 274 | if (!r.empty()) |
| 275 | { |
| 276 | std::stringstream ss; |
| 277 | ss << "invalid configuration:\n"; |
| 278 | for (auto& s : r) |
| 279 | ss << s << '\n'; |
| 280 | throw InapplicableOptionException(ss.str()); |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | void Config::set(std::string key, std::string value) |
| 285 | { |
no test coverage detected