Ignore:
Timestamp:
01/16/13 14:21:14 (9 years ago)
Author:
ascheibe
Message:

#2005 fixed handling of unobservable exceptions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UnloadJobs/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r9169 r9170  
    7676    #endregion
    7777
    78     private HiveClient() { }
     78    private HiveClient() {
     79      //this will never be deregistered
     80      TaskScheduler.UnobservedTaskException += new EventHandler<UnobservedTaskExceptionEventArgs>(TaskScheduler_UnobservedTaskException);
     81    }
     82
     83    private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) {
     84      e.SetObserved(); // avoid crash of process because task crashes. first exception found is handled in Results property
     85      throw new HiveException("Unobserved Exception in ConcurrentTaskDownloader", e.Exception);
     86    }
    7987
    8088    public void ClearHiveClient() {
Note: See TracChangeset for help on using the changeset viewer.