Ignore:
Timestamp:
2/8/2010 7:29:41 AM (2 years ago)
Author:
lowjoel
Message:

Updated to trunk r1764

Location:
branches/eraser6/CodeReview
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/CodeReview

  • branches/eraser6/CodeReview/Eraser/MainForm.cs

    r1768 r1769  
    3434using System.Diagnostics; 
    3535using System.Reflection; 
     36using System.Runtime.Serialization; 
    3637 
    3738namespace Eraser 
     
    261262                        FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) 
    262263                    { 
    263                         Program.eraserClient.Tasks.LoadFromStream(stream); 
     264                        try 
     265                        { 
     266                            Program.eraserClient.Tasks.LoadFromStream(stream); 
     267                        } 
     268                        catch (FileLoadException ex) 
     269                        { 
     270                            MessageBox.Show(S._("The task list could not be imported. The error " + 
     271                                "returned was: {0}", ex.Message), S._("Eraser"), 
     272                                MessageBoxButtons.OK, MessageBoxIcon.Error, 
     273                                MessageBoxDefaultButton.Button1, 
     274                                S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 
     275                        } 
     276                        catch (SerializationException ex) 
     277                        { 
     278                            MessageBox.Show(S._("The task list could not be imported. The error " + 
     279                                "returned was: {0}", ex.Message), S._("Eraser"), 
     280                                MessageBoxButtons.OK, MessageBoxIcon.Error, 
     281                                MessageBoxDefaultButton.Button1, 
     282                                S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 
     283                        } 
    264284                    } 
    265285                } 
Note: See TracChangeset for help on using the changeset viewer.