cm->setTransitionTime(handle, time);
} else {
- *(int*)0=0; // unexpected tag, boom
+ SG_LOG(SG_FLIGHT,SG_ALERT,"Unexpected tag '"
+ << name << "' found in YASim aircraft description");
+ exit(1);
}
}
if(eq(name, "FLAP1")) return ControlMap::FLAP1;
if(eq(name, "SLAT")) return ControlMap::SLAT;
if(eq(name, "SPOILER")) return ControlMap::SPOILER;
- *(int*)0=0;
+ SG_LOG(SG_FLIGHT,SG_ALERT,"Unrecognized control type '"
+ << name << "' in YASim aircraft description.");
+ exit(1);
+
}
void FGFDM::parseWeight(XMLAttributes* a)
int FGFDM::attri(XMLAttributes* atts, char* attr)
{
- if(!atts->hasAttribute(attr)) *(int*)0=0; // boom
+ if(!atts->hasAttribute(attr)) {
+ SG_LOG(SG_FLIGHT,SG_ALERT,"Missing '" << attr <<
+ "' in YASim aircraft description");
+ exit(1);
+ }
return attri(atts, attr, 0);
}
float FGFDM::attrf(XMLAttributes* atts, char* attr)
{
- if(!atts->hasAttribute(attr)) *(int*)0=0; // boom
+ if(!atts->hasAttribute(attr)) {
+ SG_LOG(SG_FLIGHT,SG_ALERT,"Missing '" << attr <<
+ "' in YASim aircraft description");
+ exit(1);
+ }
return attrf(atts, attr, 0);
}