Dev2.WindowsServiceManager.WriteExceptions C# (CSharp) Method

WriteExceptions() private static method

private static WriteExceptions ( Exception e, System.Configuration.Install.InstallContext context ) : void
e System.Exception
context System.Configuration.Install.InstallContext
return void
        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);
            }
        }