diff options
author | therzok <marius.ungureanu@xamarin.com> | 2016-08-09 16:40:29 +0300 |
---|---|---|
committer | therzok <marius.ungureanu@xamarin.com> | 2016-08-09 21:02:56 +0300 |
commit | e26f27606ce07a025448b424214f8e3d8142cfa3 (patch) | |
tree | 8d06cb38ece4912a47281d2ad334a1954fb3c0f0 /main/src/core/MonoDevelop.Core | |
parent | 3dea62d6cad06ab70206a0b98f4e4a75e8f7ba57 (diff) |
[NUnit] Better logging of Task failures in the NUnit addin.
This allows us to see the real stacktrace causing the bug in 41921
Diffstat (limited to 'main/src/core/MonoDevelop.Core')
-rw-r--r-- | main/src/core/MonoDevelop.Core/CoreExtensions.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Core/CoreExtensions.cs b/main/src/core/MonoDevelop.Core/CoreExtensions.cs index 411a76cffc..faa43e1de2 100644 --- a/main/src/core/MonoDevelop.Core/CoreExtensions.cs +++ b/main/src/core/MonoDevelop.Core/CoreExtensions.cs @@ -57,6 +57,11 @@ namespace System return found ? index : -1; } + + public static Exception FlattenAggregate (this Exception ex) + { + return (ex as AggregateException)?.Flatten () ?? ex; + } } } |