@@ -65,9 +65,7 @@ FGCondition::FGCondition(Element* element, std::shared_ptr<FGPropertyManager> Pr
65
65
if (logic == " OR" ) Logic = eOR;
66
66
else if (logic == " AND" ) Logic = eAND;
67
67
else { // error
68
- cerr << element->ReadFrom ()
69
- << " Unrecognized LOGIC token " << logic << endl;
70
- throw BaseException (" FGCondition: unrecognized logic value:'" + logic + " '" );
68
+ throw BaseException (" FGCondition: unrecognized LOGIC token:'" + logic + " '" );
71
69
}
72
70
} else {
73
71
Logic = eAND; // default
@@ -87,21 +85,14 @@ FGCondition::FGCondition(Element* element, std::shared_ptr<FGPropertyManager> Pr
87
85
string tagName = condition_element->GetName ();
88
86
89
87
if (tagName != elName) {
90
- cerr << condition_element->ReadFrom ()
91
- << " Unrecognized tag <" << tagName << " > in the condition statement."
92
- << endl;
93
- throw BaseException (" FGCondition: unrecognized tag:'" + tagName + " '" );
88
+ throw BaseException (" FGCondition: unrecognized TAG:'" + tagName + " ' in the condition statement." );
94
89
}
95
90
96
91
conditions.push_back (make_shared<FGCondition>(condition_element, PropertyManager));
97
92
condition_element = element->GetNextElement ();
98
93
}
99
94
100
- if (conditions.empty ()) {
101
- cerr << element->ReadFrom ()
102
- << " Empty conditional" << endl;
103
- throw BaseException (" Empty conditional" );
104
- }
95
+ if (conditions.empty ()) throw BaseException (" Empty conditional" );
105
96
106
97
Debug (0 );
107
98
}
@@ -143,11 +134,11 @@ FGCondition::FGCondition(const string& test, std::shared_ptr<FGPropertyManager>
143
134
conditional = test_strings[1 ];
144
135
TestParam2 = new FGParameterValue (test_strings[2 ], PropertyManager, el);
145
136
} else {
146
- cerr << el-> ReadFrom ()
147
- << " Conditional test is invalid: \" " << test
148
- << " \" has " << test_strings.size () << " elements in the "
149
- << " test condition." << endl ;
150
- throw BaseException (" FGCondition: incorrect number of test elements: " + std::to_string (test_strings. size () ));
137
+ ostringstream s;
138
+ s << " Conditional test is invalid: \" " << test
139
+ << " \" has " << test_strings.size () << " elements in the "
140
+ << " test condition.\n " ;
141
+ throw BaseException (s. str ( ));
151
142
}
152
143
153
144
assert (Comparison == ecUndef);
0 commit comments