diff --git a/src/FDM/JSBSim/math/FGCondition.cpp b/src/FDM/JSBSim/math/FGCondition.cpp index d17024c47..14f94fb24 100644 --- a/src/FDM/JSBSim/math/FGCondition.cpp +++ b/src/FDM/JSBSim/math/FGCondition.cpp @@ -66,7 +66,7 @@ FGCondition::FGCondition(Element* element, FGPropertyManager* PropertyManager) else { // error cerr << element->ReadFrom() << "Unrecognized LOGIC token " << logic << endl; - throw std::invalid_argument("Illegal argument"); + throw std::invalid_argument("JSBSim FGCondition: unrecognized logic value:'" + logic + "'"); } } else { Logic = eAND; // default @@ -87,7 +87,7 @@ FGCondition::FGCondition(Element* element, FGPropertyManager* PropertyManager) cerr << condition_element->ReadFrom() << "Unrecognized tag <" << tagName << "> in the condition statement." << endl; - throw std::invalid_argument("Illegal argument"); + throw std::invalid_argument("JSBSim FGCondition: unrecognized tag:'" + tagName + "'"); } conditions.push_back(new FGCondition(condition_element, PropertyManager)); @@ -119,12 +119,12 @@ FGCondition::FGCondition(const string& test, FGPropertyManager* PropertyManager, << " Conditional test is invalid: \"" << test << "\" has " << test_strings.size() << " elements in the " << "test condition." << endl; - throw("Error in test condition."); + throw std::invalid_argument("JSBSim FGCondition: incorrect numner of test elments:" + std::to_string(test_strings.size())); } Comparison = mComparison[conditional]; if (Comparison == ecUndef) { - throw("Comparison operator: \""+conditional + std::invalid_argument("JSBSim FGCondition: Comparison operator: \""+conditional +"\" does not exist. Please check the conditional."); } }