Sending Error Reports from Windows Phone 7 Application

By | February 2, 2012

Sometimes it impossible to test for ALL possible exceptions. Sometimes you test on a device and it works, and another device gives a certain exception. In most cases, it is useful for the developer to receive error reports from users. This, of course, happens with the user’s will to cooperate by sending an email containing the exception details.

The simple code I put together is in VB (yes I am an antique-collecting dude who just loves VB), prepares an email for the user to be sent to your support email. Sometimes I am really frustrated how almost all WP7 development article give C# codes.

this code goes into “App.xaml.vb” to handle all unhandled exceptions by displaying a messagebox to the user asking him/her to send the details of the error to the developer.

You have to put this as the first line in your App.xaml.vb :

Afterwards, you’re good to go.

2 thoughts on “Sending Error Reports from Windows Phone 7 Application

  1. John

    LOVE that you did this in VB. We are a forgotten group, even though we once dominated.

    Not a fan of Comic Sans font though 🙁

  2. Mohammed Alani Post author

    @John this is what motivated me to write this. I’ll try to keep writing small VB WP7 tutorials in the coming weeks.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.