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
This commit is contained in:
James Turner 2022-09-12 13:30:33 +01:00
parent 423fd4e842
commit c66a2bffe5

View File

@ -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;
}