Removed errors from output when config entries are missing

This commit is contained in:
Matt Hill
2015-03-28 16:26:33 -04:00
parent d326227e65
commit 419e9e7af4

View File

@@ -263,7 +263,8 @@ namespace alpr
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);
if (pszValue == NULL)
{
std::cout << "Error: missing configuration entry for: " << section << "->" << key << endl;
if (this->debugGeneral)
std::cout << "Warning: missing configuration entry for: " << section << "->" << key << endl;
return defaultValue;
}
@@ -275,7 +276,8 @@ namespace alpr
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);
if (pszValue == NULL)
{
std::cout << "Error: missing configuration entry for: " << section << "->" << key << endl;
if (this->debugGeneral)
std::cout << "Warning: missing configuration entry for: " << section << "->" << key << endl;
return defaultValue;
}
@@ -287,7 +289,8 @@ namespace alpr
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);
if (pszValue == NULL)
{
std::cout << "Error: missing configuration entry for: " << section << "->" << key << endl;
if (this->debugGeneral)
std::cout << "Warning: missing configuration entry for: " << section << "->" << key << endl;
return defaultValue;
}
@@ -299,7 +302,8 @@ namespace alpr
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);
if (pszValue == NULL)
{
std::cout << "Error: missing configuration entry for: " << section << "->" << key << endl;
if (this->debugGeneral)
std::cout << "Warning: missing configuration entry for: " << section << "->" << key << endl;
return defaultValue;
}