From: ThorstenB Date: Sun, 13 Nov 2011 13:26:37 +0000 (+0100) Subject: Show YASim config error messages. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7b4c5820cb2f964f2b8c48260a77355ce9eda234;p=flightgear.git Show YASim config error messages. YASim exceptions with error messages got swallowed somewhere, make sure to show them... --- diff --git a/src/FDM/YASim/YASim.cxx b/src/FDM/YASim/YASim.cxx index 35495f119..2e679c705 100644 --- a/src/FDM/YASim/YASim.cxx +++ b/src/FDM/YASim/YASim.cxx @@ -139,7 +139,14 @@ void YASim::init() SGPath f(fgGetString("/sim/aircraft-dir")); f.append(fgGetString("/sim/aero")); f.concat(".xml"); - readXML(f.str(), *_fdm); + try { + readXML(f.str(), *_fdm); + } catch (const sg_exception &e) { + SG_LOG(SG_GENERAL, SG_ALERT, + "Error reading YASim FDM: '" << f.str() << "'" << endl + << e.getFormattedMessage()); + throw e; + } // Compile it into a real airplane, and tell the user what they got a->compile();