1
0
Fork 0

Sentry: suppress more XML errors from reports

DOn’t report Ground-net or traffic schedule XML errors, and add
another XML message whitelist entry.
This commit is contained in:
James Turner 2020-12-21 19:06:16 +00:00
parent 7f5f7e0b11
commit 7214d95040
2 changed files with 10 additions and 1 deletions

View file

@ -36,6 +36,7 @@
#include "runwayprefs.hxx"
#include <Navaids/NavDataCache.hxx>
#include <Main/sentryIntegration.hxx>
using std::string;
@ -53,33 +54,39 @@ void XMLLoader::load(FGGroundNetwork* net)
SGTimeStamp t;
t.stamp();
try {
flightgear::sentryThreadReportXMLErrors(false);
FGGroundNetXMLLoader visitor(net);
readXML(path, visitor);
} catch (sg_exception& e) {
SG_LOG(SG_NAVAID, SG_DEV_WARN, "parsing groundnet XML failed:" << e.getFormattedMessage());
}
flightgear::sentryThreadReportXMLErrors(true);
SG_LOG(SG_NAVAID, SG_DEBUG, "parsing groundnet XML took " << t.elapsedMSec());
}
void XMLLoader::loadFromStream(FGGroundNetwork* net, std::istream& inData)
{
try {
flightgear::sentryThreadReportXMLErrors(false);
FGGroundNetXMLLoader visitor(net);
readXML(inData, visitor);
} catch (sg_exception& e) {
SG_LOG(SG_NAVAID, SG_DEV_WARN, "parsing groundnet XML failed:" << e.getFormattedMessage());
}
flightgear::sentryThreadReportXMLErrors(true);
}
void XMLLoader::loadFromPath(FGGroundNetwork* net, const SGPath& path)
{
try {
flightgear::sentryThreadReportXMLErrors(false);
FGGroundNetXMLLoader visitor(net);
readXML(path, visitor);
} catch (sg_exception& e) {
SG_LOG(SG_NAVAID, SG_DEV_WARN, "parsing groundnet XML failed:" << e.getFormattedMessage());
}
flightgear::sentryThreadReportXMLErrors(true);
}
void XMLLoader::load(FGRunwayPreference* p) {

View file

@ -74,6 +74,7 @@
#include <Main/fg_init.hxx>
#include <Main/globals.hxx>
#include <Main/fg_props.hxx>
#include <Main/sentryIntegration.hxx>
#include "TrafficMgr.hxx"
@ -127,8 +128,9 @@ public:
return _isFinished;
}
virtual void run()
void run() override
{
flightgear::sentryThreadReportXMLErrors(false);
for (const auto& p : _trafficDirPaths) {
parseTrafficDir(p);
if (_cancelThread) {