From 7b4c5820cb2f964f2b8c48260a77355ce9eda234 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 13 Nov 2011 14:26:37 +0100 Subject: [PATCH] Show YASim config error messages. YASim exceptions with error messages got swallowed somewhere, make sure to show them... --- src/FDM/YASim/YASim.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(); -- 2.39.5