2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-01 22:47:26 +00:00

chore: log exception when parsing material json fails

This commit is contained in:
Jan
2024-08-08 18:27:00 +02:00
parent bec082fc0c
commit f452270f8a

View File

@@ -39,9 +39,18 @@ namespace
return false;
}
try
{
const auto jMaterial = jRoot.get<JsonMaterial>();
return CreateMaterialFromJson(jMaterial, material);
}
catch (const json::exception& e)
{
std::cerr << std::format("Failed to parse json of material: {}\n", e.what());
}
return false;
}
private:
static void PrintError(const Material& material, const std::string& message)