chore: log exception when parsing weapon camo json fails

This commit is contained in:
Jan 2024-08-08 18:50:35 +02:00
parent 774da9a584
commit 0707fa5873
No known key found for this signature in database
GPG Key ID: 44B581F78FF5C57C

View File

@ -39,8 +39,17 @@ namespace
return false; return false;
} }
const auto jWeaponCamo = jRoot.get<JsonWeaponCamo>(); try
return CreateWeaponCamoFromJson(jWeaponCamo, weaponCamo); {
const auto jWeaponCamo = jRoot.get<JsonWeaponCamo>();
return CreateWeaponCamoFromJson(jWeaponCamo, weaponCamo);
}
catch (const json::exception& e)
{
std::cerr << std::format("Failed to parse json of weapon camo: {}\n", e.what());
}
return false;
} }
private: private: