From 5c27bcfea23f665c723812de36402ee11411805d Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 28 Dec 2012 06:34:10 +0000 Subject: [PATCH] - only show debug output in verbose mode --- source/glest_game/global/lang.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/glest_game/global/lang.cpp b/source/glest_game/global/lang.cpp index fc0ea0f2..d852c9e8 100644 --- a/source/glest_game/global/lang.cpp +++ b/source/glest_game/global/lang.cpp @@ -577,11 +577,13 @@ string Lang::getNativeLanguageName(string uselanguage, string testLanguageFile) result = stringsTest.getString("NativeLanguageName"); cachedNativeLanguageNames[testLanguageFile] = result; - //if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Caching native language name for [%s] = [%s]\n",testLanguageFile.c_str(),result.c_str()); - printf("Caching native language name for [%s] = [%s]\n",testLanguageFile.c_str(),result.c_str()); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Caching native language name for [%s] = [%s]\n",testLanguageFile.c_str(),result.c_str()); + } + catch(const exception &ex) { + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("ERROR Caching native language name for [%s] msg: [%s]\n",testLanguageFile.c_str(),ex.what()); } - //catch(const exception &ex) { catch(...) { + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("ERROR Caching native language name for [%s] msg: [UNKNOWN]\n",testLanguageFile.c_str()); } }