| 98 | } |
| 99 | |
| 100 | void PropertiesFile::update(const std::string& key, const std::string& value) { |
| 101 | auto it = findKey(key); |
| 102 | if (it != lines_.end()) { |
| 103 | it->updateValue(value); |
| 104 | } else { |
| 105 | throw std::invalid_argument{"Key " + key + " not found in the config file!"}; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | void PropertiesFile::insertAfter(const std::string& after_key, const std::string& key, const std::string& value) { |
| 110 | auto it = findKey(after_key); |
no test coverage detected