Changeset 8885 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceConsumerView.cs
- Timestamp:
- 11/08/12 16:43:08 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceConsumerView.cs
r8877 r8885 40 40 public DataAnalysisInstanceConsumerView() { 41 41 InitializeComponent(); 42 43 42 } 44 43 … … 51 50 try { 52 51 instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 53 54 52 } 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); 57 55 return; 58 56 } … … 60 58 GenericConsumer.Load(instance); 61 59 } 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); 64 62 } 65 63 } else { … … 70 68 } 71 69 } 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 } 72 77 } 73 78 }
Note: See TracChangeset
for help on using the changeset viewer.