fix spectacularly useless error messages
This commit is contained in:
parent
c30ff46f83
commit
caa83238b8
2 changed files with 8 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue