Don't catch a (potentially) meaningful exception only to replace it with
a meaningless one. bootstrap.cxx/main() will catch it, anyway.
This commit is contained in:
parent
c5a3f570f8
commit
b502cef066
1 changed files with 74 additions and 81 deletions
|
@ -1327,7 +1327,6 @@ void fgInitFDM() {
|
|||
double dt = 1.0 / fgGetInt("/sim/model-hz");
|
||||
string model = fgGetString("/sim/flight-model");
|
||||
|
||||
try {
|
||||
if ( model == "larcsim" ) {
|
||||
cur_fdm_state = new FGLaRCsim( dt );
|
||||
} else if ( model == "jsb" ) {
|
||||
|
@ -1403,14 +1402,8 @@ void fgInitFDM() {
|
|||
} else if ( model == "yasim" ) {
|
||||
cur_fdm_state = new YASim( dt );
|
||||
} else {
|
||||
SG_LOG(SG_GENERAL, SG_ALERT,
|
||||
"Unrecognized flight model '" << model
|
||||
<< "', cannot init flight dynamics model.");
|
||||
exit(-1);
|
||||
}
|
||||
} catch ( ... ) {
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, "FlightGear aborting\n\n");
|
||||
exit(-1);
|
||||
throw sg_throwable(string("Unrecognized flight model '") + model
|
||||
+ "', cannot init flight dynamics model.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue