diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 5e577619d..7d4746fff 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -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(); } diff --git a/src/Base/Parameter.cpp b/src/Base/Parameter.cpp index 21ddc1fc9..7eaa80de3 100644 --- a/src/Base/Parameter.cpp +++ b/src/Base/Parameter.cpp @@ -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; } }