Skip to content
Snippets Groups Projects
Commit be3415b7 authored by Russell Taylor's avatar Russell Taylor
Browse files

Catch a possible Poco exception which otherwise propagates uncaught and crashes Mantid.

Log the offending statement and then ignores the property. Fixes #553.
parent 263d82bf
No related merge requests found
...@@ -101,10 +101,16 @@ namespace Mantid ...@@ -101,10 +101,16 @@ namespace Mantid
if( !m_pConf->hasProperty(*sitr) ) continue; if( !m_pConf->hasProperty(*sitr) ) continue;
std::string value(m_pConf->getString(*sitr)); std::string value(m_pConf->getString(*sitr));
if( Poco::Path(value).isRelative() ) try {
{ if( Poco::Path(value).isRelative() )
m_mAbsolutePaths.insert(std::make_pair(*sitr, Poco::Path(execdir).resolve(value).toString())); {
} m_mAbsolutePaths.insert(std::make_pair(*sitr, Poco::Path(execdir).resolve(value).toString()));
}
}
catch (Poco::PathSyntaxException &ex)
{
g_log.error() << ex.what() << " in .properties file: " << value << std::endl;
}
} }
} }
......
...@@ -127,9 +127,7 @@ public: ...@@ -127,9 +127,7 @@ public:
TS_ASSERT_EQUALS(ConfigService::Instance().getString("mantid.thorax"), "1"); TS_ASSERT_EQUALS(ConfigService::Instance().getString("mantid.thorax"), "1");
} }
private:
ConfigService *configSvc;
}; };
#endif /*MANTID_CONFIGSERVICETEST_H_*/ #endif /*MANTID_CONFIGSERVICETEST_H_*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment