From caa83238b8b05195bb5394783d7192ba2a16c0c9 Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 29 Mar 2007 21:26:33 +0000 Subject: [PATCH] fix spectacularly useless error messages --- src/Main/fg_init.cxx | 13 ++++++------- src/Sound/fg_fx.cxx | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 0edef90f3..cc4556733 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -404,13 +404,12 @@ SGPropertyNode *fgInitLocale(const char *language) { const char *d_path_str = d_node->getStringValue("strings"); if (!d_path_str) { - SG_LOG(SG_GENERAL, SG_ALERT, "Incorrect path in configuration file."); + SG_LOG(SG_GENERAL, SG_ALERT, "No path in " << d_node->getPath() << "/strings."); return NULL; } d_path.append(d_path_str); - SG_LOG(SG_GENERAL, SG_INFO, "Reading localized strings from " - << d_path.str()); + SG_LOG(SG_GENERAL, SG_INFO, "Reading localized strings from " << d_path.str()); SGPropertyNode *strings = c_node->getNode("strings"); try { @@ -428,18 +427,18 @@ SGPropertyNode *fgInitLocale(const char *language) { const char *c_path_str = c_node->getStringValue("strings"); if (!c_path_str) { - SG_LOG(SG_GENERAL, SG_ALERT, "Incorrect path in configuration file."); + SG_LOG(SG_GENERAL, SG_ALERT, "No path in " << c_node->getPath() << "/strings"); return NULL; } c_path.append(c_path_str); - SG_LOG(SG_GENERAL, SG_INFO, "Reading localized strings from " - << c_path.str()); + SG_LOG(SG_GENERAL, SG_INFO, "Reading localized strings from " << c_path.str()); try { readProperties(c_path.str(), strings); } catch (const sg_exception &e) { - SG_LOG(SG_GENERAL, SG_ALERT, "Unable to read the localized strings"); + SG_LOG(SG_GENERAL, SG_ALERT, + "Unable to read the localized strings from " << c_path.str()); return NULL; } } diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index a76059349..37df00392 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -74,7 +74,7 @@ FGFX::init() string path_str = node->getStringValue("path"); SGPath path( globals->get_fg_root() ); if (path_str.empty()) { - SG_LOG(SG_GENERAL, SG_ALERT, "Incorrect path in configuration file."); + SG_LOG(SG_GENERAL, SG_ALERT, "No path in /sim/sound/path"); return; } @@ -87,7 +87,7 @@ FGFX::init() readProperties(path.str(), &root); } catch (const sg_exception &) { SG_LOG(SG_GENERAL, SG_ALERT, - "Incorrect path specified in configuration file"); + "Error reading file '" << path.str() << '\''); return; }