1
0
Fork 0

Relax the assert when trying to clip with max < min.

Throwing an exception was too harsh. Instead the clipping is ignored and a warning message issued.
Reintroducing the commit 90a04a that has been inadvertently removed.
This commit is contained in:
Bertrand Coconnier 2019-12-30 00:30:26 +01:00
parent 53fac332c1
commit 801ec1f7a6

View file

@ -245,10 +245,10 @@ void FGFCSComponent::Clip(void)
double range = vmax - vmin;
if (range < 0.0) {
cerr << "Trying to clip with a max value " << ClipMax->GetName()
<< " lower than the min value " << ClipMin->GetName()
<< endl;
throw("JSBSim aborts");
cerr << "Trying to clip with a max value (" << vmax << ") from "
<< ClipMax->GetName() << " lower than the min value (" << vmin
<< ") from " << ClipMin->GetName() << "." << endl
<< "Clipping is ignored." << endl;
return;
}