impr: Better JSON error handling in many places

This commit is contained in:
WerWolv
2023-05-16 11:33:00 +02:00
parent 7e9b23de7d
commit 3bd4a3ba8b
14 changed files with 46 additions and 45 deletions

View File

@@ -217,7 +217,7 @@ namespace hex::plugin::builtin {
void FileProvider::loadSettings(const nlohmann::json &settings) {
Provider::loadSettings(settings);
auto pathString = settings["path"].get<std::string>();
auto pathString = settings.at("path").get<std::string>();
std::fs::path path = std::u8string(pathString.begin(), pathString.end());
if (auto projectPath = ProjectFile::getPath(); !projectPath.empty())