+ do not abort if user.cfg or system.cfg is empty
This commit is contained in:
parent
ce528d1c4a
commit
f2319de49d
|
@ -1372,7 +1372,7 @@ void Application::LoadParameters(void)
|
|||
catch (const Base::Exception& e) {
|
||||
// try to proceed with an empty XML document
|
||||
Base::Console().Error("%s in file %s.\n"
|
||||
"Continue with an empty configuration.",
|
||||
"Continue with an empty configuration.\n",
|
||||
e.what(), mConfig["SystemParameter"].c_str());
|
||||
_pcSysParamMngr->CreateDocument();
|
||||
}
|
||||
|
@ -1391,7 +1391,7 @@ void Application::LoadParameters(void)
|
|||
catch (const Base::Exception& e) {
|
||||
// try to proceed with an empty XML document
|
||||
Base::Console().Error("%s in file %s.\n"
|
||||
"Continue with an empty configuration.",
|
||||
"Continue with an empty configuration.\n",
|
||||
e.what(), mConfig["UserParameter"].c_str());
|
||||
_pcUserParamMngr->CreateDocument();
|
||||
}
|
||||
|
|
|
@ -1090,9 +1090,13 @@ int ParameterManager::LoadDocument(const char* sFileName)
|
|||
#endif
|
||||
return LoadDocument(inputSource);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
throw;
|
||||
}
|
||||
catch (...) {
|
||||
std::cerr << "An error occurred during parsing\n " << std::endl;
|
||||
return 0;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user