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");
|
const char *d_path_str = d_node->getStringValue("strings");
|
||||||
if (!d_path_str) {
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_path.append(d_path_str);
|
d_path.append(d_path_str);
|
||||||
SG_LOG(SG_GENERAL, SG_INFO, "Reading localized strings from "
|
SG_LOG(SG_GENERAL, SG_INFO, "Reading localized strings from " << d_path.str());
|
||||||
<< d_path.str());
|
|
||||||
|
|
||||||
SGPropertyNode *strings = c_node->getNode("strings");
|
SGPropertyNode *strings = c_node->getNode("strings");
|
||||||
try {
|
try {
|
||||||
|
@ -428,18 +427,18 @@ SGPropertyNode *fgInitLocale(const char *language) {
|
||||||
|
|
||||||
const char *c_path_str = c_node->getStringValue("strings");
|
const char *c_path_str = c_node->getStringValue("strings");
|
||||||
if (!c_path_str) {
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
c_path.append(c_path_str);
|
c_path.append(c_path_str);
|
||||||
SG_LOG(SG_GENERAL, SG_INFO, "Reading localized strings from "
|
SG_LOG(SG_GENERAL, SG_INFO, "Reading localized strings from " << c_path.str());
|
||||||
<< c_path.str());
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
readProperties(c_path.str(), strings);
|
readProperties(c_path.str(), strings);
|
||||||
} catch (const sg_exception &e) {
|
} 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ FGFX::init()
|
||||||
string path_str = node->getStringValue("path");
|
string path_str = node->getStringValue("path");
|
||||||
SGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
if (path_str.empty()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ FGFX::init()
|
||||||
readProperties(path.str(), &root);
|
readProperties(path.str(), &root);
|
||||||
} catch (const sg_exception &) {
|
} catch (const sg_exception &) {
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT,
|
SG_LOG(SG_GENERAL, SG_ALERT,
|
||||||
"Incorrect path specified in configuration file");
|
"Error reading file '" << path.str() << '\'');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue