Changeset 1824 for branches/eraser6/6.0


Ignore:
Timestamp:
2/12/2010 3:41:48 AM (4 years ago)
Author:
lowjoel
Message:

When executing links we may get errors from ShellExecute?, so display these errors instead of crashing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/6.0/Eraser/MainForm.cs

    r1821 r1824  
    321321        private void eraserLogo_Click(object sender, EventArgs e) 
    322322        { 
    323             Process.Start("http://eraser.heidi.ie/"); 
     323            try 
     324            { 
     325                Process.Start("http://eraser.heidi.ie/"); 
     326            } 
     327            catch (Win32Exception ex) 
     328            { 
     329                //We've got an error executing the the browser to pass the links: show an error 
     330                //to the user. 
     331                MessageBox.Show(S._("Could not open the required web page. The error returned " + 
     332                    "was: {0}", ex.Message), S._("Eraser"), MessageBoxButtons.OK, 
     333                    MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 
     334                    Localisation.IsRightToLeft(this) ? 
     335                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
     336            } 
    324337        } 
    325338 
Note: See TracChangeset for help on using the changeset viewer.