Error-reporting: show XML path when 3D load fails

This commit is contained in:
James Turner 2021-03-07 12:30:24 +00:00 committed by Automatic Release Builder
parent 84a569913d
commit 57b4060eb3

View File

@ -313,7 +313,7 @@ sgLoad3DModel_internal(const SGPath& path,
modelpath = SGModelLib::findDataFile(modelPathStr, NULL, modelDir);
if (modelpath.isNull()) {
simgear::reportFailure(simgear::LoadFailure::NotFound, simgear::ErrorCode::ThreeDModelLoad,
"Model not found:" + modelPathStr, sg_location{modelPathStr});
"Model not found:" + modelPathStr, path);
throw sg_io_exception("Model file not found: '" + modelPathStr + "'",
path, {}, false);
}