Changeset 1844
- Timestamp:
- 05/18/09 18:03:53 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.3/MainForm.cs
r1529 r1844 155 155 try { 156 156 task.storable = PersistenceManager.Load(task.filename); 157 } catch (FileNotFoundException fileNotFoundEx) {157 } catch (FileNotFoundException fileNotFoundEx) { 158 158 MessageBox.Show("Sorry couldn't open file \"" + task.filename + "\".\nThe file or plugin \"" + fileNotFoundEx.FileName + "\" is not available.\nPlease make sure you have all necessary plugins installed.", 159 159 "Reader Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 160 } catch(TypeLoadException typeLoadEx) { 161 MessageBox.Show("Sorry couldn't open file \"" + task.filename + "\".\nThe type \"" + typeLoadEx.TypeName+ "\" is not available.\nPlease make sure that you have the correct version the plugin installed.", 160 } catch (TypeLoadException typeLoadEx) { 161 MessageBox.Show("Sorry couldn't open file \"" + task.filename + "\".\nThe type \"" + typeLoadEx.TypeName + "\" is not available.\nPlease make sure that you have the correct version the plugin installed.", 162 "Reader Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 163 } catch (Exception e) { 164 MessageBox.Show(String.Format( 165 "Sorry couldn't open file \"{0}\".\n The following exception occurred: {1}", 166 task.filename, e.ToString()), 162 167 "Reader Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 163 168 } … … 205 210 Save(form); 206 211 } 212 207 213 } 208 214 private void AsynchronousSave(object state) { 209 215 Task task = (Task)state; 210 PersistenceManager.Save(task.storable, task.filename); 216 try { 217 PersistenceManager.Save(task.storable, task.filename); 218 } catch (Exception e) { 219 MessageBox.Show(String.Format( 220 "Sorry couldn't open file \"{0}\".\n The following exception occurred: {1}", 221 task.filename, e.ToString()), 222 "Reader Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 223 } 211 224 SaveFinished(task); 212 225 }
Note: See TracChangeset
for help on using the changeset viewer.