private void EvaAddPartModule(Part part)
{
try
{
ConfigNode node = new ConfigNode("MODULE");
node.AddValue("name", "LifeSupportModule");
part.AddModule(node);
this.LogWarning("The expected exception did not happen when adding the Life Support part module to the EVA!");
}
catch (Exception ex)
{
if (ex.Message.Contains("Object reference not set"))
{
this.Log("Adding life support to the EVA part succeeded as expected.");
}
else
{
this.LogError("Unexpected error while adding the Life Support part module to the EVA: " + ex.Message + "\n" + ex.StackTrace);
}
}
}