Unwrap inner exceptions for AggregateExceptions

This commit is contained in:
Pranav K 2017-06-20 18:43:17 -07:00
parent 5834660081
commit 8d095d3af6
1 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,12 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal
{
return base.Execute(ExpandResponseFiles(args));
}
catch (AggregateException ex) when (ex.InnerException != null)
{
Error.WriteLine(ex.InnerException.Message);
Error.WriteLine(ex.InnerException.StackTrace);
return 1;
}
catch (Exception ex)
{
Error.WriteLine(ex.Message);