Print the identifier of the offending scene graph node when the specification fails

This commit is contained in:
Alexander Bock
2021-07-26 11:03:06 +02:00
parent 817621617e
commit 3ae1028a85
+6 -1
View File
@@ -654,7 +654,12 @@ int addSceneGraphNode(lua_State* L) {
global::renderEngine->scene()->initializeNode(node);
}
catch (const documentation::SpecificationError& e) {
LERRORC("Scene", ghoul::to_string(e.result));
std::string cat =
d.hasValue<std::string>("Identifier") ?
d.value<std::string>("Identifier") :
"Scene";
LERRORC(cat, ghoul::to_string(e.result));
return ghoul::lua::luaError(
L,
fmt::format("Error loading scene graph node: {}", e.what())