Skip to content
This repository was archived by the owner on Nov 21, 2017. It is now read-only.

LittleWatson

PedroLamas edited this page Feb 3, 2012 · 1 revision

LittleWatson is a small error reporting tool for your Windows Phone applications.

It monitors for unhandled exceptions and stores their info into the Isolated Storage before the application shutsdown. When the application restarts, it will check for if a previous exception occurred and ask the user permission to send the exception info thru e-mail.

Usage

First you must initialize LittleWatson in your App.xaml.cs file. Add the following line to the App(), just after the InitializePhoneApplication() method call:

LittleWatson.Initialize("[email protected]", "Application Error");

Do remember to change the e-mail and subject to something that makes sense to you!

On the RootFrame_NavigationFailed event handler, add the following code to the top:

LittleWatson.ReportException(e.Exception, "Navigation has Failed");

Then, on the Application_UnhandledException event handler, add the following code to the top:

LittleWatson.ReportException(e.ExceptionObject, "Unhandled Exception");

The final step is adding the LittleWatson.CheckForPreviousException(); on the Loaded event handler of your startup page.

Clone this wiki locally