Add error logs for non logged exceptions

This commit is contained in:
morg authored and Adam Honse committed 2022-02-28 22:08:41 +00:00
1 parent ddeb5de65e
commit d8f28b546d
5 files changed
+15 -9

No files matched your search

+4 -1
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();