From: mfranz Date: Tue, 19 Jun 2007 10:10:00 +0000 (+0000) Subject: loadxml, savexml: don't pop up a GUI error message on error, but use a X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=588ce7e4702c2ac6ba6180c4a81cfad85071c254;p=flightgear.git 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. --- diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 492657190..6fc2a3cd8 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -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; }