Add error logs for non logged exceptions

This commit is contained in:
morg 2022-02-28 20:59:47 +01:00 committed by Adam Honse
parent ddeb5de65e
commit d8f28b546d
5 changed files with 15 additions and 9 deletions

View file

@ -10,6 +10,7 @@
\*-----------------------------------------*/
#include "SettingsManager.h"
#include "LogManager.h"
#include <fstream>
#include <iostream>
@ -82,6 +83,8 @@ void SettingsManager::LoadSettings(std::string filename)
| parsing failed. Clear out any data in the store |
| as it is corrupt. |
\*-------------------------------------------------*/
LOG_ERROR("[SettingsManager] JSON parsing failed: %s", e.what());
settings_data.clear();
}
}
@ -101,7 +104,7 @@ void SettingsManager::SaveSettings()
}
catch(const std::exception& e)
{
LOG_ERROR("[SettingsManager] Cannot write to file: %s", e.what());
}
settings_file.close();