Changeset 17445
- Timestamp:
- 02/19/20 13:50:24 (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs
r17180 r17445 223 223 224 224 private async void startButton_Click(object sender, EventArgs e) { 225 await Content.StartAsync(); 225 try { 226 await Content.StartAsync(); 227 } catch (Exception ex) { 228 ErrorHandling.ShowErrorDialog(this, ex); 229 } 226 230 } 227 231 private void pauseButton_Click(object sender, EventArgs e) { -
trunk/HeuristicLab.Clients.Hive.Slave/3.3/Executor.cs
r17180 r17445 46 46 public bool IsStopping { get; set; } 47 47 public bool IsPausing { get; set; } 48 public bool HasFailed { get; set; } 48 49 49 50 public Exception CurrentException; … … 84 85 85 86 task.Start(); 86 if (!startTaskSem.WaitOne(Settings.Default.ExecutorSemTimeouts) ) {87 if (!startTaskSem.WaitOne(Settings.Default.ExecutorSemTimeouts) && !HasFailed) { 87 88 throw new TimeoutException("Timeout when starting the task. TaskStarted event was not fired."); 88 89 } … … 159 160 #region Task Events 160 161 private void Task_TaskFailed(object sender, EventArgs e) { 162 HasFailed = true; 161 163 IsStopping = true; 162 164 EventArgs<Exception> ex = (EventArgs<Exception>)e; 163 165 CurrentException = ex.Value; 164 166 executorQueue.AddMessage(ExecutorMessageType.TaskFailed); 167 startTaskSem.Set(); // cancel waiting for startup 165 168 } 166 169 -
trunk/HeuristicLab.Clients.Hive/3.3/Tasks/EngineTask.cs
r17180 r17445 80 80 81 81 public override async void Start() { 82 Item.Prepare(initialOperation); 83 await Item.StartAsync(); 82 try { 83 Item.Prepare(initialOperation); 84 await Item.StartAsync(); 85 } catch (Exception e) { 86 engine_ExceptionOccurred(Item, new EventArgs<Exception>(e)); 87 } 84 88 } 85 89 -
trunk/HeuristicLab.Clients.Hive/3.3/Tasks/OptimizerTask.cs
r17180 r17445 101 101 OnTaskStopped(); 102 102 } else { 103 await Item.StartAsync(); 103 try { 104 await Item.StartAsync(); 105 } catch (Exception e) { 106 optimizer_ExceptionOccurred(Item, new EventArgs<Exception>(e)); 107 } 104 108 } 105 109 } -
trunk/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBAlgorithmView.cs
r17180 r17445 325 325 } 326 326 private async void startButton_Click(object sender, EventArgs e) { 327 await Content.StartAsync(); 327 try { 328 await Content.StartAsync(); 329 } catch (Exception ex) { 330 ErrorHandling.ShowErrorDialog(this, ex); 331 } 328 332 } 329 333 private void pauseButton_Click(object sender, EventArgs e) { -
trunk/HeuristicLab.Optimization.Views/3.3/IOptimizerView.cs
r17180 r17445 137 137 #region Control events 138 138 protected virtual async void startButton_Click(object sender, EventArgs e) { 139 await Content.StartAsync(); 139 try { 140 await Content.StartAsync(); 141 } catch (Exception ex) { 142 ErrorHandling.ShowErrorDialog(this, ex); 143 } 140 144 } 141 145 protected virtual void pauseButton_Click(object sender, EventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.