Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/18/17 12:18:47 (7 years ago)
Author:
jkarder
Message:

#2830:

  • the asynchronous calls are now awaited
  • added extension method to flatten and handle inner exceptions of AggregateExceptions
  • fixed some catch clauses
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/Engine.cs

    r15287 r15367  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    2524using System.Threading;
    2625using HeuristicLab.Common;
     
    9190      } catch (OperationCanceledException) {
    9291      } catch (AggregateException ae) {
    93         OnExceptionOccurred(ae.InnerExceptions.SingleOrDefault() ?? ae);
     92        ae.FlattenAndHandle(new[] { typeof(OperationCanceledException) }, e => OnExceptionOccurred(e));
    9493      } catch (Exception e) {
    9594        OnExceptionOccurred(e);
Note: See TracChangeset for help on using the changeset viewer.