提交 daf44613 编写于 作者: M Matt Warren 提交者: GitHub

Merge pull request #14712 from mattwar/WatsonAggregates

Unwrap aggregate exceptions before watson
......@@ -18,6 +18,15 @@ internal static void OnFatalException(Exception exception)
Debugger.Break();
}
#if !NETFX20
// don't fail fast with an aggregate exception that is masking true exception
var aggregate = exception as AggregateException;
if (aggregate != null && aggregate.InnerExceptions.Count == 1)
{
exception = aggregate.InnerExceptions[0];
}
#endif
Environment.FailFast(exception.ToString(), exception);
}
......
......@@ -76,8 +76,14 @@
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;NETFX20</DefineConstants>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE;NETFX20</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Portable\Resources.Designer.cs">
<Link>Resources.Designer.cs</Link>
......@@ -102,4 +108,4 @@
</ItemGroup>
<Import Project="..\ResultProvider.projitems" Label="Shared" />
<Import Project="..\..\..\..\..\..\build\Targets\VSL.Imports.targets" />
</Project>
</Project>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册