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);
|
||||
simgear::PathList trafficFiles = d2.children(simgear::Dir::TYPE_FILE, ".xml");
|
||||
for (const auto& xml : trafficFiles) {
|
||||
try {
|
||||
readXML(xml, *this);
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue