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

This commit is contained in:
James Turner 2021-03-07 12:30:24 +00:00
parent 087547c6a0
commit 71358dca92

View File

@ -556,7 +556,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);
}