From c66a2bffe58fd869f3388f9ecf4ce60ef10a5ae0 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 12 Sep 2022 13:30:33 +0100 Subject: [PATCH] XML submodel: log the model name in the error. Try to improve diagnosis of problems where overlay XML Nodes are used, and the model path might be empty, as happened with the 737-800 --- simgear/scene/model/SGReaderWriterXML.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/scene/model/SGReaderWriterXML.cxx b/simgear/scene/model/SGReaderWriterXML.cxx index e317aa63..6523a8d2 100644 --- a/simgear/scene/model/SGReaderWriterXML.cxx +++ b/simgear/scene/model/SGReaderWriterXML.cxx @@ -673,7 +673,7 @@ sgLoad3DModel_internal(const SGPath& path, if (submodelPath.isNull()) { SG_LOG(SG_IO, SG_DEV_ALERT, "Failed to load file: \"" << subPathStr << "\""); simgear::reportFailure(simgear::LoadFailure::NotFound, simgear::ErrorCode::XMLModelLoad, - "Couldn't find file for submodel:" + subPathStr, + "Couldn't find file for submodel '" + sub_props->getStringValue("name") + "': " + subPathStr, SGPath::fromUtf8(subPathStr)); continue; }