Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/15 16:14:30 (9 years ago)
Author:
gkronber
Message:

#2522:

  • moved UI components out of HeuristicLab.PluginInfrastructure -> HeuristicLab.PluginInfrastructure.UI
  • moved ErrorDialog to HeuristicLab.MainForm.WindowsForms
  • moved ErrorHandling (for building an error message string) to HeuristicLab.Common
  • Changed exception handlers in Views to use MainForm.ShowError()
  • Changed usages for ErrorDialog in non-UI components to throw exceptions instead.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r12926 r13338  
    137137          }
    138138        }
    139       }
    140       finally {
     139      } finally {
    141140        SuppressEvents = false;
    142141      }
     
    307306        //don't show the error dialog when downloading tasks, the HiveClient will throw an exception and the dialog will be shown then
    308307        if (sender.GetType() != typeof(ConcurrentTaskDownloader<ItemTask>) && sender.GetType() != typeof(TaskDownloader)) {
    309           ErrorHandling.ShowErrorDialog(this, e.Value);
     308          MainFormManager.MainForm.ShowError(e.Value.Message, e.Value);
    310309        }
    311310      }
     
    359358        }, TaskContinuationOptions.OnlyOnFaulted);
    360359      } else {
    361         HiveClient.StartJob((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Start failed.", ex), Content, new CancellationToken());
     360        HiveClient.StartJob((Exception ex) => MainFormManager.MainForm.ShowError("Start failed.", ex), Content, new CancellationToken());
    362361      }
    363362    }
     
    419418        try {
    420419          invoker.EndInvoke(ar);
    421         }
    422         catch (Exception ex) {
    423           ThreadPool.QueueUserWorkItem(delegate(object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex);
     420        } catch (Exception ex) {
     421          ThreadPool.QueueUserWorkItem(delegate(object exception) {
     422            var _ex = (Exception)exception;
     423            MainFormManager.MainForm.ShowError(_ex.Message, _ex);
     424          }, ex);
    424425        }
    425426      }, null);
Note: See TracChangeset for help on using the changeset viewer.