From 801ec1f7a69c8f5c8b8296916b30b93884fced2e Mon Sep 17 00:00:00 2001 From: Bertrand Coconnier Date: Mon, 30 Dec 2019 00:30:26 +0100 Subject: [PATCH] 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. --- src/FDM/JSBSim/models/flight_control/FGFCSComponent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FDM/JSBSim/models/flight_control/FGFCSComponent.cpp b/src/FDM/JSBSim/models/flight_control/FGFCSComponent.cpp index 84c5169ea..8f37b40c8 100644 --- a/src/FDM/JSBSim/models/flight_control/FGFCSComponent.cpp +++ b/src/FDM/JSBSim/models/flight_control/FGFCSComponent.cpp @@ -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; }