private static void WriteExceptions(Exception e, InstallContext context)
{
if (context == null)
{
return;
}
var aggregateException = e as AggregateException;
if (aggregateException != null)
{
foreach (Exception child in aggregateException.InnerExceptions)
{
context.LogMessage(child.Message);
}
}
else
{
context.LogMessage(e.Message);
}
}