Navigation errro handling

Jan 29, 2011 at 6:30 PM

I noticed a slight difference between the PhoneBootstrapper and the standard MS Phone template and was wondering if it made sense to add a bit of code...

In the standard InitializePhoneApplication there's a line

RootFrame.NavigationFailed += RootFrame.NavigationFailed;

which invokes

 if (System.Diagnostics.Debugger.IsAttached)
     // A navigation has failed; break into the debugger

So all we need is virtual function on PhoneBootstrapper (OnNavigationFailed) with that as default behaviour and we have some nicer error handling behaviour which is modifiable if necessary.

Jan 30, 2011 at 12:13 AM

You should be able to use INavigationService for this.