Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/05/11 11:27:37 (13 years ago)
Author:
gkronber
Message:

#1570: handled exception in auto-updating mechanism when no internet connection is available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs

    r6413 r6515  
    9090      });
    9191      task.ContinueWith(t => {
    92         updatesAvailable = t.Result;
    93         UpdateApplicationsList();
    94       }, TaskContinuationOptions.NotOnFaulted);
     92        try {
     93          t.Wait();
     94          updatesAvailable = t.Result;
     95          UpdateApplicationsList();
     96        }
     97        catch (AggregateException ae) {
     98          ae.Handle(ex => {
     99            if (ex is InstallationManagerException) {
     100              // this is expected when no internet connection is available => do nothing
     101              return true;
     102            } else {
     103              return false;
     104            }
     105          });
     106        }
     107      });
    95108    }
    96109
Note: See TracChangeset for help on using the changeset viewer.