1
0
Fork 0

Show YASim config error messages.

YASim exceptions with error messages got swallowed somewhere, make
sure to show them...
This commit is contained in:
ThorstenB 2011-11-13 14:26:37 +01:00
parent 12b6e8952a
commit 7b4c5820cb

View 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();