Remove Sentry XML error suppression
We now supress XML errors from reporting internally, so this can be removed, woo-hoo.
This commit is contained in:
parent
f84f4ba592
commit
8535126a7d
13 changed files with 2 additions and 41 deletions
|
@ -223,9 +223,6 @@ SGPropertyNode_ptr FGAIManager::registerScenarioFile(SGPropertyNode_ptr root, co
|
|||
|
||||
simgear::ErrorReportContext ectx("scenario-path", xmlPath.utf8Str());
|
||||
|
||||
// don't report XML errors while loading scenarios, to Sentry
|
||||
flightgear::SentryXMLErrorSupression xml;
|
||||
|
||||
try {
|
||||
SGPropertyNode_ptr scenarioProps(new SGPropertyNode);
|
||||
readProperties(xmlPath, scenarioProps);
|
||||
|
@ -671,9 +668,6 @@ FGAIManager::loadScenarioFile(const std::string& scenarioName, SGPath& outPath)
|
|||
auto s = fgGetNode("/sim/ai/scenarios");
|
||||
if (!s) return {};
|
||||
|
||||
// don't report XML errors while loading scenarios, to Sentry
|
||||
flightgear::SentryXMLErrorSupression xml;
|
||||
|
||||
for (auto n : s->getChildren("scenario")) {
|
||||
if (n->getStringValue("id") == scenarioName) {
|
||||
SGPath path{n->getStringValue("path")};
|
||||
|
|
|
@ -54,7 +54,6 @@ void XMLLoader::load(FGGroundNetwork* net)
|
|||
SGTimeStamp t;
|
||||
t.stamp();
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
FGGroundNetXMLLoader visitor(net);
|
||||
readXML(path, visitor);
|
||||
|
||||
|
@ -72,7 +71,6 @@ void XMLLoader::load(FGGroundNetwork* net)
|
|||
void XMLLoader::loadFromStream(FGGroundNetwork* net, std::istream& inData)
|
||||
{
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
FGGroundNetXMLLoader visitor(net);
|
||||
readXML(inData, visitor);
|
||||
|
||||
|
@ -87,7 +85,6 @@ void XMLLoader::loadFromStream(FGGroundNetwork* net, std::istream& inData)
|
|||
void XMLLoader::loadFromPath(FGGroundNetwork* net, const SGPath& path)
|
||||
{
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
FGGroundNetXMLLoader visitor(net);
|
||||
readXML(path, visitor);
|
||||
|
||||
|
@ -145,7 +142,6 @@ bool XMLLoader::loadAirportXMLDataIntoVisitor(const string& aICAO,
|
|||
|
||||
bool readXMLOk = true;
|
||||
try {
|
||||
flightgear::sentryThreadReportXMLErrors(false);
|
||||
SG_LOG(SG_NAVAID, SG_DEBUG, "loadAirportXMLDataIntoVisitor: loading from " << path);
|
||||
readXML(path, aVisitor);
|
||||
} catch (sg_exception& e) {
|
||||
|
@ -153,7 +149,6 @@ bool XMLLoader::loadAirportXMLDataIntoVisitor(const string& aICAO,
|
|||
SG_LOG(SG_NAVAID, SG_WARN, "XML errors trying to read:" << path);
|
||||
}
|
||||
|
||||
flightgear::sentryThreadReportXMLErrors(true);
|
||||
return readXMLOk;
|
||||
}
|
||||
|
||||
|
|
|
@ -209,8 +209,6 @@ void FGXMLAutopilotGroup::addAutopilotFromFile( const std::string& name,
|
|||
|
||||
try
|
||||
{
|
||||
flightgear::SentryXMLErrorSupression xmlc;
|
||||
|
||||
SGPropertyNode_ptr configNode = new SGPropertyNode();
|
||||
readProperties(config, configNode);
|
||||
|
||||
|
|
|
@ -822,10 +822,10 @@ fgReadPanel (istream &input)
|
|||
SGPropertyNode root;
|
||||
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
readProperties(input, &root);
|
||||
} catch (const sg_exception &e) {
|
||||
guiErrorMessage("Error reading panel: ", e);
|
||||
simgear::reportFailure(simgear::LoadFailure::BadData, simgear::ErrorCode::AircraftSystems,
|
||||
"Failed to load aircraft panel:" + e.getFormattedMessage());
|
||||
return 0;
|
||||
}
|
||||
return readPanel(&root, SGPath{});
|
||||
|
@ -851,7 +851,6 @@ fgReadPanel (const string &relative_path)
|
|||
}
|
||||
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
readProperties(path, &root);
|
||||
} catch (const sg_exception &e) {
|
||||
simgear::reportFailure(simgear::LoadFailure::BadData, simgear::ErrorCode::AircraftSystems,
|
||||
|
|
|
@ -402,11 +402,6 @@ protected:
|
|||
flightgear::addSentryBreadcrumb("AircraftScan started", "info");
|
||||
readCache();
|
||||
|
||||
// avoid filling up Sentry with many reports
|
||||
// from unmaintained aircraft. We'll still fail if soemeone tries
|
||||
// to use the aircraft, but that's 100x less common.
|
||||
flightgear::sentryThreadReportXMLErrors(false);
|
||||
|
||||
Q_FOREACH(QString d, m_dirs) {
|
||||
const auto p = SGPath::fromUtf8(d.toUtf8().toStdString());
|
||||
m_currentScanDir->setCurrentPath(p);
|
||||
|
@ -807,7 +802,6 @@ LocalAircraftCache::readAircraftProperties(const SGPath &setPath, SGPropertyNode
|
|||
dp->setCurrentAircraftPath(setPath);
|
||||
|
||||
ParseSetXMLResult result = ParseSetXMLResult::Failed;
|
||||
flightgear::sentryThreadReportXMLErrors(false);
|
||||
|
||||
try {
|
||||
readProperties(setPath, props);
|
||||
|
@ -819,7 +813,6 @@ LocalAircraftCache::readAircraftProperties(const SGPath &setPath, SGPropertyNode
|
|||
}
|
||||
|
||||
rm->removeProvider(dp.get());
|
||||
flightgear::sentryThreadReportXMLErrors(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,6 @@ FGDeviceConfigurationMap::configurationForDeviceName(const std::string& name)
|
|||
|
||||
SGPropertyNode_ptr result(new SGPropertyNode);
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
readProperties(it->second, result);
|
||||
result->setStringValue("source", it->second.utf8Str());
|
||||
} catch (sg_exception& e) {
|
||||
|
@ -167,7 +166,6 @@ void FGDeviceConfigurationMap::refreshCacheForFile(const SGPath& path)
|
|||
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, "Reading device file " << path);
|
||||
SGPropertyNode_ptr n(new SGPropertyNode);
|
||||
flightgear::SentryXMLErrorSupression dontReportXmlErrors;
|
||||
try {
|
||||
readProperties(path, n);
|
||||
} catch (sg_exception& e) {
|
||||
|
|
|
@ -856,9 +856,6 @@ 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::SentryXMLErrorSupression xmls;
|
||||
try {
|
||||
readProperties(validated_path, targetnode, true);
|
||||
} catch (const sg_exception &e) {
|
||||
|
|
|
@ -312,7 +312,6 @@ public:
|
|||
|
||||
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
readProperties(_foundPath, globals->get_props());
|
||||
} catch ( const sg_exception &e ) {
|
||||
SG_LOG(SG_INPUT, SG_ALERT,
|
||||
|
|
|
@ -853,7 +853,6 @@ FGGlobals::loadUserSettings(SGPath userDataPath)
|
|||
SG_LOG(SG_INPUT, SG_INFO,
|
||||
"Reading user settings from " << autosaveFile);
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
readProperties(autosaveFile, &autosave, SGPropertyNode::USERARCHIVE);
|
||||
} catch (sg_exception& e) {
|
||||
SG_LOG(SG_INPUT, SG_WARN, "failed to read user settings:" << e.getMessage()
|
||||
|
|
|
@ -1070,20 +1070,14 @@ 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 {
|
||||
|
|
|
@ -763,7 +763,6 @@ FGGeneric::reinit()
|
|||
|
||||
SGPropertyNode root;
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
readProperties(path, &root);
|
||||
} catch (const sg_exception & ex) {
|
||||
SG_LOG(SG_NETWORK, SG_ALERT,
|
||||
|
|
|
@ -133,13 +133,10 @@ FGFX::init()
|
|||
|
||||
SGPropertyNode root;
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xmls;
|
||||
readProperties(path, &root);
|
||||
} catch (const sg_exception& e) {
|
||||
simgear::reportFailure(simgear::LoadFailure::BadData, simgear::ErrorCode::AudioFX,
|
||||
"Failure loading FX XML:" + e.getFormattedMessage(), e.getLocation());
|
||||
SG_LOG(SG_SOUND, SG_ALERT,
|
||||
"Error reading file '" << path << '\'');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,6 @@ public:
|
|||
|
||||
void run() override
|
||||
{
|
||||
flightgear::sentryThreadReportXMLErrors(false);
|
||||
for (const auto& p : _trafficDirPaths) {
|
||||
parseTrafficDir(p);
|
||||
if (_cancelThread) {
|
||||
|
|
Loading…
Reference in a new issue