Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15478 for trunk/sources


Ignore:
Timestamp:
11/17/17 13:21:34 (6 years ago)
Author:
jkarder
Message:

#2846:

  • only swallow a potential NullReferenceException while jobs are added
  • removed redundant check in OnContentChanged
Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobManagerView.cs

    r15419 r15478  
    6767      } else {
    6868        hiveExperimentListView.Content = Content.Jobs;
    69         if (Content != null) {
    70           try {
    71             await System.Threading.Tasks.Task.Run(() => Content.Refresh());
    72           } catch (Exception ex) {
    73             HandleServiceException(ex);
    74           }
     69        try {
     70          await System.Threading.Tasks.Task.Run(() => Content.Refresh());
     71        } catch (Exception ex) {
     72          HandleServiceException(ex);
    7573        }
    7674      }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r15419 r15478  
    9696        var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<Job>>(s => s.GetJobs());
    9797
    98         foreach (var j in jobsLoaded) {
    99           jobs.Add(new RefreshableJob(j));
    100         }
    101       } catch (NullReferenceException) {
    102         // jobs was set to null during ClearHiveClient
     98        try {
     99          foreach (var j in jobsLoaded) {
     100            jobs.Add(new RefreshableJob(j));
     101          }
     102        } catch (NullReferenceException) {
     103          // jobs was set to null during ClearHiveClient
     104        }
    103105      } catch {
    104106        jobs = null;
Note: See TracChangeset for help on using the changeset viewer.