Changeset 17377


Ignore:
Timestamp:
12/17/19 10:09:52 (12 months ago)
Author:
pfleck
Message:

#3042 Removes the progress bar in case of an exception, and rethrows the exception.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r17180 r17377  
    313313    private async void btnOptimizeConstants_Click(object sender, EventArgs e) {
    314314      progress.Start("Optimizing Constants ...");
    315       var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
    316       var newTree = await Task.Run(() => OptimizeConstants(tree, progress));
    317       await Task.Delay(500); // wait for progressbar to finish animation
    318       UpdateModel(newTree); // UpdateModel calls Progress.Finish (via Content_Changed)
     315      try {
     316        var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
     317        var newTree = await Task.Run(() => OptimizeConstants(tree, progress));
     318        await Task.Delay(500); // wait for progressbar to finish animation
     319        UpdateModel(newTree); // UpdateModel calls Progress.Finish (via Content_Changed)
     320      } catch (Exception) {
     321        progress.Finish();
     322        throw;
     323      }
    319324    }
    320325  }
Note: See TracChangeset for help on using the changeset viewer.