Catch XML errors parsing traffic files
Sentry-Id: FLIGHTGEAR-EQ
This commit is contained in:
parent
fd630b6d37
commit
358fb70ee0
1 changed files with 7 additions and 3 deletions
|
@ -382,10 +382,14 @@ private:
|
||||||
SG_LOG(SG_AI, SG_DEBUG, "parsing traffic in:" << p);
|
SG_LOG(SG_AI, SG_DEBUG, "parsing traffic in:" << p);
|
||||||
simgear::PathList trafficFiles = d2.children(simgear::Dir::TYPE_FILE, ".xml");
|
simgear::PathList trafficFiles = d2.children(simgear::Dir::TYPE_FILE, ".xml");
|
||||||
for (const auto& xml : trafficFiles) {
|
for (const auto& xml : trafficFiles) {
|
||||||
|
try {
|
||||||
readXML(xml, *this);
|
readXML(xml, *this);
|
||||||
if (_cancelThread) {
|
if (_cancelThread) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} catch (sg_exception& e) {
|
||||||
|
SG_LOG(SG_AI, SG_WARN, "XML error parsing traffic file:" << xml << "\n\t" << e.getFormattedMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // of sub-directories iteration
|
} // of sub-directories iteration
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue