1
0
Fork 0

Change YASim solution failure message to display as an alert; but not to call exit().

It is the call to exit that causes FG to lock up and become a zombie.

Alternative is to throw an exception, i.e.:
       throw sg_error(std::string("YASim SOLUTION FAILURE:") + a->getFailureMsg(););
This commit is contained in:
Richard Harrison 2018-03-07 03:09:38 +01:00
parent 7b7e50741f
commit 10caef48b1

View file

@ -77,9 +77,8 @@ void YASim::report()
SG_LOG(SG_FLIGHT, SG_INFO, buf);
if(a->getFailureMsg()) {
SG_LOG(SG_FLIGHT, SG_ALERT, "YASim SOLUTION FAILURE:");
SG_LOG(SG_FLIGHT, SG_ALERT, a->getFailureMsg());
exit(1);
SG_LOG(SG_FLIGHT, SG_POPUP, std::string("YASim flight dynamics problem:") + a->getFailureMsg()+"\nThe aircraft may not fly correctly");
//throw sg_error(std::string("YASim SOLUTION FAILURE:") + a->getFailureMsg(););
}
}