Changeset 15367 for trunk/sources/HeuristicLab.Common/3.3/AsyncHelper.cs
- Timestamp:
- 09/18/17 12:18:47 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/AsyncHelper.cs
r15287 r15367 21 21 22 22 using System; 23 using System.Linq;24 23 using System.Runtime.ExceptionServices; 25 24 using System.Threading; … … 38 37 } catch (OperationCanceledException) { 39 38 } catch (AggregateException ae) { 40 var e = ae.InnerExceptions.SingleOrDefault() ?? ae; 41 ExceptionDispatchInfo.Capture(e).Throw(); 39 ae.FlattenAndHandle(new[] { typeof(OperationCanceledException) }, e => ExceptionDispatchInfo.Capture(e).Throw()); 42 40 } 43 41 }
Note: See TracChangeset
for help on using the changeset viewer.