Sentry: don't report more XML errors
Don't report XML errors when parsing Nasal-loaded content, or n the launcher when scanning aircraft information.
This commit is contained in:
parent
be50f64821
commit
81150ff6a1
2 changed files with 9 additions and 0 deletions
|
@ -805,6 +805,8 @@ LocalAircraftCache::readAircraftProperties(const SGPath &setPath, SGPropertyNode
|
|||
dp->setCurrentAircraftPath(setPath);
|
||||
|
||||
ParseSetXMLResult result = ParseSetXMLResult::Failed;
|
||||
flightgear::sentryThreadReportXMLErrors(false);
|
||||
|
||||
try {
|
||||
readProperties(setPath, props);
|
||||
result = ParseSetXMLResult::Ok;
|
||||
|
@ -815,6 +817,7 @@ LocalAircraftCache::readAircraftProperties(const SGPath &setPath, SGPropertyNode
|
|||
}
|
||||
|
||||
rm->removeProvider(dp.get());
|
||||
flightgear::sentryThreadReportXMLErrors(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <Environment/presets.hxx>
|
||||
#include <Navaids/NavDataCache.hxx>
|
||||
#include <GUI/gui.h>
|
||||
#include <Main/sentryIntegration.hxx>
|
||||
|
||||
#include "fg_init.hxx"
|
||||
#include "fg_io.hxx"
|
||||
|
@ -782,12 +783,17 @@ do_load_xml_to_proptree(const SGPropertyNode * arg, SGPropertyNode * root)
|
|||
else
|
||||
targetnode = const_cast<SGPropertyNode *>(arg)->getNode("data", true);
|
||||
|
||||
// don't report Sentry errors for Nasal-loaded XML, since it makes
|
||||
// for very noisy reports
|
||||
flightgear::sentryThreadReportXMLErrors(false);
|
||||
try {
|
||||
readProperties(validated_path, targetnode, true);
|
||||
} catch (const sg_exception &e) {
|
||||
SG_LOG(SG_IO, quiet ? SG_DEV_WARN : SG_WARN, "loadxml exception: " << e.getFormattedMessage());
|
||||
flightgear::sentryThreadReportXMLErrors(true);
|
||||
return false;
|
||||
}
|
||||
flightgear::sentryThreadReportXMLErrors(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue