Skip to content
Snippets Groups Projects
Commit 795f08e1 authored by Steven Murray's avatar Steven Murray
Browse files

CastorConfiguration::getConfEntInt() now uses DEFAULT in all error conditions

parent bf589e64
No related branches found
No related tags found
No related merge requests found
......@@ -147,14 +147,14 @@ const std::string& castor::common::CastorConfiguration::getConfEntString(
(*log)(LOG_INFO, "Got configuration entry", params);
}
return value;
} catch(castor::exception::Exception &ne) {
} catch(castor::exception::Exception &ex) {
if(NULL != log) {
log::Param params[] = {
log::Param("category", category),
log::Param("key", key),
log::Param("value", defaultValue),
log::Param("source", "DEFAULT"),
log::Param("reasonForUsingDefault", ne.getMessage().str())};
log::Param("reasonForUsingDefault", ex.getMessage().str())};
(*log)(LOG_INFO, "Got configuration entry", params);
}
return defaultValue;
......
......@@ -141,13 +141,14 @@ namespace castor {
std::string strValue;
try {
strValue = getConfEntString(category, key);
} catch(castor::exception::NoEntry &ne) {
} catch(castor::exception::Exception &ex) {
if(NULL != log) {
log::Param params[] = {
log::Param("category", category),
log::Param("key", key),
log::Param("value", defaultValue),
log::Param("source", "DEFAULT")};
log::Param("source", "DEFAULT"),
log::Param("reasonForUsingDefault", ex.getMessage().str())};
(*log)(LOG_INFO, "Got configuration entry", params);
}
return defaultValue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment