From 419e9e7af4aee9fff17f1278b7575f5f45289c74 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Sat, 28 Mar 2015 16:26:33 -0400 Subject: [PATCH] Removed errors from output when config entries are missing --- src/openalpr/config.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/openalpr/config.cpp b/src/openalpr/config.cpp index c47c354..59966d6 100644 --- a/src/openalpr/config.cpp +++ b/src/openalpr/config.cpp @@ -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; }