54 |
|
{ |
55 |
|
try |
56 |
|
{ |
57 |
< |
Uri uri = new Uri(url); |
58 |
< |
this.Provider.Navigate(uri); |
57 |
> |
try |
58 |
> |
{ |
59 |
> |
Uri uri = new Uri(url); |
60 |
> |
this.Provider.Navigate(uri); |
61 |
> |
} |
62 |
> |
catch (UriFormatException) |
63 |
> |
{ |
64 |
> |
try |
65 |
> |
{ |
66 |
> |
UriBuilder builder = new UriBuilder(url); |
67 |
> |
var proto = builder.Uri.Scheme; |
68 |
> |
this.Provider.Navigate(builder.Uri); |
69 |
> |
} |
70 |
> |
catch (Exception ex) |
71 |
> |
{ |
72 |
> |
throw ex; |
73 |
> |
} |
74 |
> |
} |
75 |
|
} |
76 |
|
catch (UriFormatException ex) |
77 |
|
{ |
79 |
|
logger.Error.WriteLine("Unable to navigate to url: '{0}'", url); |
80 |
|
logger.VerboseError.WriteLine(ex.ToString()); |
81 |
|
} |
82 |
+ |
catch (Exception ex) |
83 |
+ |
{ |
84 |
+ |
MessageBox.Show(string.Format("Could not navigate to url: '{0}'", url), string.Format("An {0} Exception Occurred in '{1}'",ex.GetType().Name, this.GetType().Name), MessageBoxButtons.OK, MessageBoxIcon.Error); |
85 |
+ |
logger.Error.WriteLine("Unable to navigate to url: '{0}'", url); |
86 |
+ |
logger.VerboseError.WriteLine(ex.ToString()); |
87 |
+ |
} |
88 |
|
} |
89 |
|
|
90 |
|
#endregion |