Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/08/12 16:43:08 (12 years ago)
Author:
sforsten
Message:

#1942:

  • implemented changes suggested by mkommend in comment:15:ticket:1942 except the first remark
  • TimeSeriesPrognosisInstanceProvider has been adapted to work similar to other DataAnalysisInstanceProvider, also views have been created for it
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceConsumerView.cs

    r8877 r8885  
    4040    public DataAnalysisInstanceConsumerView() {
    4141      InitializeComponent();
    42 
    4342    }
    4443
     
    5150          try {
    5251            instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat);
    53 
    5452          }
    55           catch (Exception ex) {
    56             MessageBox.Show(String.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error);
     53          catch (IOException ex) {
     54            ErrorWhileParsing(ex);
    5755            return;
    5856          }
     
    6058            GenericConsumer.Load(instance);
    6159          }
    62           catch (Exception ex) {
    63             MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(importTypeDialog.Path), Environment.NewLine + ex.Message), "Cannot load instance");
     60          catch (IOException ex) {
     61            ErrorWhileLoading(ex, importTypeDialog.Path);
    6462          }
    6563        } else {
     
    7068      }
    7169    }
     70
     71    protected void ErrorWhileParsing(Exception ex) {
     72      MessageBox.Show(String.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error);
     73    }
     74    protected void ErrorWhileLoading(Exception ex, string path) {
     75      MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(path), Environment.NewLine + ex.Message), "Cannot load instance");
     76    }
    7277  }
    7378}
Note: See TracChangeset for help on using the changeset viewer.