loadxml, savexml: don't pop up a GUI error message on error, but use a
simple SG_LOG instead. The user didn't call the fgcommand, so why should s/he be bothered with that? And the actually caller of the command gets a return value and can pop up a dialog if it thinks it's necessary.
This commit is contained in:
parent
c0e6b239df
commit
588ce7e470
1 changed files with 2 additions and 4 deletions
|
@ -1341,8 +1341,7 @@ do_load_xml_to_proptree(const SGPropertyNode * arg)
|
|||
try {
|
||||
readProperties(file.c_str(), targetnode, true);
|
||||
} catch (const sg_exception &e) {
|
||||
string errmsg = "Error reading file " + file.str() + ":\n";
|
||||
guiErrorMessage(errmsg.c_str(), e);
|
||||
SG_LOG(SG_IO, SG_WARN, "Warning: couldn't load file '" << file.str() << '\'');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1384,8 +1383,7 @@ do_save_xml_from_proptree(const SGPropertyNode * arg)
|
|||
try {
|
||||
writeProperties (file.c_str(), sourcenode, true);
|
||||
} catch (const sg_exception &e) {
|
||||
string errmsg = "Error writing file " + file.str() + ":\n";
|
||||
guiErrorMessage(errmsg.c_str(), e);
|
||||
SG_LOG(SG_IO, SG_WARN, "Warning: couldn't save file '" << file.str() << '\'');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue