Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/26/12 10:58:40 (12 years ago)
Author:
spimming
Message:

#1680: Show error dialog (from PluginInfrastructure) instead of message box on exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs

    r7565 r7661  
    122122        Subscription subscription = (Subscription)cmbChooseSubscription.SelectedItem;
    123123        if (subscription.CurrentHostedServices == subscription.MaxHostedServices) {
    124           MessageBox.Show("You have already created the maximum number of hosted services", "Limit Reached", MessageBoxButtons.OK, MessageBoxIcon.Error);
     124          PluginInfrastructure.ErrorHandling.ShowErrorDialog(new Exception("You have already created the maximum number of hosted services"));
    125125          cbNewHostedService.Checked = false;
    126126        } else {
     
    264264      }
    265265      catch (Exception ex) {
    266         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     266        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    267267      }
    268268    }
     
    317317      catch (Exception ex) {
    318318        errorOccured = true;
    319         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     319        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    320320      }
    321321
     
    332332      catch (Exception ex) {
    333333        errorOccured = true;
    334         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     334        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    335335      }
    336336
     
    348348      catch (Exception ex) {
    349349        errorOccured = true;
    350         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     350        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    351351      }
    352352
     
    359359      catch (Exception ex) {
    360360        errorOccured = true;
    361         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     361        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    362362        if (newHostedServiceChecked) {
    363363          CloudManagerClient.Instance.AzureProvider.DeleteHostedService(sub, hostedService.ServiceName);
     
    375375      catch (Exception ex) {
    376376        errorOccured = true;
    377         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     377        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    378378        if (newHostedServiceChecked) {
    379379          CloudManagerClient.Instance.AzureProvider.DeleteHostedService(sub, hostedService.ServiceName);
Note: See TracChangeset for help on using the changeset viewer.