Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/16/13 14:21:14 (11 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/ConcurrentTaskDownloader.cs

    r9169 r9170  
    3939      downloadSemaphore = new Semaphore(concurrentDownloads, concurrentDownloads);
    4040      deserializeSemaphore = new Semaphore(concurrentDeserializations, concurrentDeserializations);
    41       TaskScheduler.UnobservedTaskException += new EventHandler<UnobservedTaskExceptionEventArgs>(TaskScheduler_UnobservedTaskException);
    4241    }
    4342
     
    102101    }
    103102
    104     private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) {
    105       e.SetObserved(); // avoid crash of process because task crashes. first exception found is handled in Results property
    106       OnExceptionOccured(new HiveException("Unobserved Exception in ConcurrentTaskDownloader", e.Exception));
    107     }
    108 
    109103    public event EventHandler<EventArgs<Exception>> ExceptionOccured;
    110104    private void OnExceptionOccured(Exception exception) {
     
    115109    #region IDisposable Members
    116110    public void Dispose() {
    117       TaskScheduler.UnobservedTaskException -= new EventHandler<UnobservedTaskExceptionEventArgs>(TaskScheduler_UnobservedTaskException);
    118111      deserializeSemaphore.Dispose();
    119112      downloadSemaphore.Dispose();
Note: See TracChangeset for help on using the changeset viewer.