Autosave loading: suppress XML errors
This commit is contained in:
parent
e1a9d27ca6
commit
a47d126ba5
2 changed files with 6 additions and 2 deletions
src/Main
|
@ -298,7 +298,9 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
flightgear::SentryXMLErrorSupression xs;
|
||||
readProperties(_foundPath, globals->get_props());
|
||||
} catch ( const sg_exception &e ) {
|
||||
SG_LOG(SG_INPUT, SG_ALERT,
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include <Navaids/navlist.hxx>
|
||||
|
||||
#include <GUI/gui.h>
|
||||
#include <Main/sentryIntegration.hxx>
|
||||
#include <Viewer/viewmgr.hxx>
|
||||
|
||||
#include <Scenery/scenery.hxx>
|
||||
|
@ -848,6 +849,7 @@ 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()
|
||||
|
|
Loading…
Add table
Reference in a new issue