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.Optimization/3.3/Algorithms/BasicAlgorithm.cs

    r15215 r15232  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Threading;
    2425using HeuristicLab.Common;
     
    6970      } catch (OperationCanceledException) {
    7071      } catch (AggregateException ae) {
    71         if (ae.InnerExceptions.Count == 1) OnExceptionOccurred(ae.InnerExceptions[0]);
    72         else OnExceptionOccurred(ae);
     72        OnExceptionOccurred(ae.InnerExceptions.SingleOrDefault() ?? ae);
    7373      } catch (Exception e) {
    7474        OnExceptionOccurred(e);
Note: See TracChangeset for help on using the changeset viewer.