One of my students recently typed the command fgfs : echo $? The result was: Fatal error: Failed to open file at : (received from SimGear XML Parser)
-------------- Two observations: 1) The student found this error message to be uninformative. I have to agree; using the word "at" for this purpose seems non-standard and confusing. Attached is a patch to make several improvements in the error message. 2) Why is fgfs trying to open a file? Is this an important feature? What might be the semantics of this feature? I couldn't find it documented anywhere in getstart.pdf or in the --help --verbose message. commit 3a4e6c2177b05ac14002e6795abaa6c5582c31c8 Author: John Denker <j...@av8n.com> Date: Fri Feb 5 08:50:09 2010 -0700 More informative error message. diff --git a/simgear/structure/exception.cxx b/simgear/structure/exception.cxx index accd970..2bea8d1 100644 --- a/simgear/structure/exception.cxx +++ b/simgear/structure/exception.cxx @@ -102,12 +102,12 @@ sg_location::asString () const { std::ostringstream out; if (_path[0]) { - out << _path; + out << "'" << _path << "'"; if (_line != -1 || _column != -1) out << ",\n"; } if (_line != -1) { - out << "line " << _line; + out << " at line " << _line; if (_column != -1) out << ", "; } @@ -270,8 +270,7 @@ sg_io_exception::getFormattedMessage () const string ret = getMessage(); string loc = getLocation().asString(); if (loc.length()) { - ret += "\n at "; - ret += loc; + ret += "\n File: " + loc; } return ret; } ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel