Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/13/17 15:53:56 (7 years ago)
Author:
jkarder
Message:

#2258: worked on exception handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Async/HeuristicLab.Core/3.3/Engine.cs

    r15065 r15232  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425using System.Threading;
    2526using HeuristicLab.Common;
     
    9091      } catch (OperationCanceledException) {
    9192      } catch (AggregateException ae) {
    92         if (ae.InnerExceptions.Count == 1) OnExceptionOccurred(ae.InnerExceptions[0]);
    93         else OnExceptionOccurred(ae);
     93        OnExceptionOccurred(ae.InnerExceptions.SingleOrDefault() ?? ae);
    9494      } catch (Exception e) {
    9595        OnExceptionOccurred(e);
Note: See TracChangeset for help on using the changeset viewer.