mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 07:42:54 +00:00
chore: log exception when parsing material json fails
This commit is contained in:
parent
bec082fc0c
commit
f452270f8a
@ -39,8 +39,17 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto jMaterial = jRoot.get<JsonMaterial>();
|
||||
return CreateMaterialFromJson(jMaterial, material);
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user