Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7162


Ignore:
Timestamp:
12/09/11 13:23:29 (13 years ago)
Author:
ascheibe
Message:

#1672 throw exceptions in Job Manager so that we can see if something went wrong

File:
1 edited

Legend:

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

    r7156 r7162  
    2424using System.Linq;
    2525using System.Threading;
     26using System.Threading.Tasks;
    2627using System.Windows.Forms;
    2728using HeuristicLab.Clients.Hive.Views;
     
    3233using HeuristicLab.Optimization;
    3334using HeuristicLab.PluginInfrastructure;
    34 using System.Threading.Tasks;
    3535
    3636namespace HeuristicLab.Clients.Hive.JobManager.Views {
     
    302302    }
    303303    private void Content_ExceptionOccured(object sender, EventArgs<Exception> e) {
    304       // don't show exception, it is logged anyway     
     304      throw e.Value;
    305305    }
    306306    private void Content_StateLogListChanged(object sender, EventArgs e) {
     
    317317        SetEnabledStateOfControls();
    318318      }
    319     } 
     319    }
    320320
    321321    private void UpdateStateLogList() {
     
    336336      if (nameTextBox.Text.Trim() == string.Empty) {
    337337        MessageBox.Show("Please enter a name for the job before uploading it!", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Information);
    338       } else if (Content.ExecutionState == ExecutionState.Paused) {             
     338      } else if (Content.ExecutionState == ExecutionState.Paused) {
    339339        var task = System.Threading.Tasks.Task.Factory.StartNew(ResumeJobAsync, Content);
    340340        task.ContinueWith((t) => {
     
    350350    private void pauseButton_Click(object sender, EventArgs e) {
    351351      var task = System.Threading.Tasks.Task.Factory.StartNew(PauseJobAsync, Content);
    352       task.ContinueWith((t) => {       
     352      task.ContinueWith((t) => {
    353353        FinishProgressView();
    354354        MessageBox.Show("An error occured pausing the job. See the log for more information.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error);
    355355        Content.Log.LogException(t.Exception);
    356356      }, TaskContinuationOptions.OnlyOnFaulted);
    357     }         
     357    }
    358358
    359359    private void stopButton_Click(object sender, EventArgs e) {
     
    533533      if (tabControl.SelectedTab == permissionTabPage) {
    534534        if (!Content.IsSharable) {
    535           MessageBox.Show("Unable to load tab. You have insufficient access privileges.");
     535          MessageBox.Show("Unable to load permissions. You have insufficient access privileges.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Information);
    536536          tabControl.SelectedTab = tasksTabPage;
    537537        }
Note: See TracChangeset for help on using the changeset viewer.