- Timestamp:
- 01/02/11 04:05:04 (14 years ago)
- Location:
- branches/ParallelEngine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ParallelEngine/HeuristicLab.Core/3.3/Engine.cs
r5185 r5187 93 93 } 94 94 catch (AggregateException ex) { 95 ex.Flatten().Handle(x => { 96 if (!(x is OperationCanceledException)) OnExceptionOccurred(x); 97 return true; 98 }); 95 try { 96 ex.Flatten().Handle(x => x is OperationCanceledException); 97 } 98 catch (AggregateException remaining) { 99 if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]); 100 else OnExceptionOccurred(remaining); 101 } 99 102 } 100 103 cancellationTokenSource.Dispose(); 101 104 cancellationTokenSource = null; 102 if (stopRequested) { 103 executionStack.Clear(); 104 OnStopped(); 105 } else { 106 if (executionStack.Count == 0) OnStopped(); 107 else OnPaused(); 108 } 105 if (stopRequested) executionStack.Clear(); 106 if (executionStack.Count == 0) OnStopped(); 107 else OnPaused(); 109 108 }); 110 109 } -
branches/ParallelEngine/HeuristicLab.ParallelEngine/3.3/ParallelEngine.cs
r5185 r5187 92 92 } else { 93 93 for (int i = coll.Count - 1; i >= 0; i--) 94 if (coll[i] != null) ExecutionStack.Push(coll[i]);94 if (coll[i] != null) executionStack.Push(coll[i]); 95 95 } 96 96 } else if (next is IAtomicOperation) { … … 101 101 catch (Exception ex) { 102 102 executionStack.Push(operation); 103 throw new OperatorExecutionException(operation.Operator, ex); 103 if (ex is OperationCanceledException) throw ex; 104 else throw new OperatorExecutionException(operation.Operator, ex); 104 105 } 105 106 if (next != null) executionStack.Push(next); 107 108 if (operation.Operator.Breakpoint) { 109 string message = string.Format("Breakpoint: {0}", operation.Operator.Name != string.Empty ? operation.Operator.Name : operation.Operator.ItemName); 110 Log.LogMessage(message); 111 throw new OperationCanceledException(message); 112 } 106 113 } 107 114 } -
branches/ParallelEngine/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs
r5185 r5187 62 62 catch (Exception ex) { 63 63 ExecutionStack.Push(operation); 64 throw new OperatorExecutionException(operation.Operator, ex); 64 if (ex is OperationCanceledException) throw ex; 65 else throw new OperatorExecutionException(operation.Operator, ex); 65 66 } 66 67 if (next != null) ExecutionStack.Push(next);
Note: See TracChangeset
for help on using the changeset viewer.