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,9 +382,13 @@ 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) {
|
||||||
readXML(xml, *this);
|
try {
|
||||||
if (_cancelThread) {
|
readXML(xml, *this);
|
||||||
return;
|
if (_cancelThread) {
|
||||||
|
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