diff --git a/src/Navaids/FlightPlan.cxx b/src/Navaids/FlightPlan.cxx index 06be225df..857cfc09a 100644 --- a/src/Navaids/FlightPlan.cxx +++ b/src/Navaids/FlightPlan.cxx @@ -48,6 +48,7 @@ #include #include #include +#include
using std::string; using std::vector; @@ -1068,15 +1069,21 @@ bool FlightPlan::loadGpxFormat(const SGPath& path) bool FlightPlan::loadXmlFormat(const SGPath& path) { SGPropertyNode_ptr routeData(new SGPropertyNode); + + // avoid error reports on user flight-plans + flightgear::sentryThreadReportXMLErrors(false); try { readProperties(path, routeData); } catch (sg_exception& e) { SG_LOG(SG_NAVAID, SG_ALERT, "Failed to load flight-plan '" << e.getOrigin() << "'. " << e.getMessage()); // XML parsing fails => not a property XML file + flightgear::sentryThreadReportXMLErrors(true); return false; } + flightgear::sentryThreadReportXMLErrors(true); + if (routeData.valid()) { try {