Navigation errro handling

Jan 29, 2011 at 5: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
     System.Diagnostics.Debugger.Break();
 }

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.

Coordinator
Jan 29, 2011 at 11:13 PM

You should be able to use INavigationService for this.