Flatten AggregateExceptions in rzc

This commit is contained in:
Ajay Bhargav Baaskaran 2018-07-31 11:11:43 -07:00
parent 3ff064cea3
commit a4b91d6dce
1 changed files with 5 additions and 2 deletions

View File

@ -57,8 +57,11 @@ namespace Microsoft.AspNetCore.Razor.Tools
}
catch (AggregateException ex) when (ex.InnerException != null)
{
Error.WriteLine(ex.InnerException.Message);
Error.WriteLine(ex.InnerException.StackTrace);
foreach (var innerException in ex.Flatten().InnerExceptions)
{
Error.WriteLine(innerException.Message);
Error.WriteLine(innerException.StackTrace);
}
return 1;
}
catch (CommandParsingException ex)