| 93 | } |
| 94 | |
| 95 | void SettingsManager::SaveSettings() |
| 96 | { |
| 97 | std::ofstream settings_file(settings_filename, std::ios::out | std::ios::binary); |
| 98 | |
| 99 | if(settings_file) |
| 100 | { |
| 101 | try |
| 102 | { |
| 103 | settings_file << settings_data.dump(4); |
| 104 | } |
| 105 | catch(const std::exception& e) |
| 106 | { |
| 107 | LOG_ERROR("[SettingsManager] Cannot write to file: %s", e.what()); |
| 108 | } |
| 109 | |
| 110 | settings_file.close(); |
| 111 | } |
| 112 | } |
no test coverage detected