]> git.mxchange.org Git - flightgear.git/commitdiff
Show YASim config error messages.
authorThorstenB <brehmt@gmail.com>
Sun, 13 Nov 2011 13:26:37 +0000 (14:26 +0100)
committerThorstenB <brehmt@gmail.com>
Sun, 13 Nov 2011 13:26:37 +0000 (14:26 +0100)
YASim exceptions with error messages got swallowed somewhere, make
sure to show them...

src/FDM/YASim/YASim.cxx

index 35495f11944a67d154ddee2d1ad4237531901424..2e679c705d339b11afe1454b492caf237fa7df89 100644 (file)
@@ -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();