Talk:Reporting unhandled exceptions in your Windows Phone apps
Hamishwillee - Reviewed/fixed
Tidied up the English a bit - wasn't awful, so mostly a matter of style. Moved the introduction into the abstract section up the top - which I think is now more succinct and avoids duplication.
Lastly, added in small code fragment, which I think is useful "hint" for users and search engines.
Thanks for your work on this (also Vinay!)
Regards HPS, also fixed title
09:58, 26 April 2013 (EEST)
Amar8050 - Crash observed.I tried incorporating this feature in the code along with an extra feature of sending an email to the coded email address when an exception occurs. But the app crashes as soon as the exception occurs and does not send a mail. Please help.
16:05, 28 May 2013 (EEST)
Somnathbanik - Write log
Hi Amar,I think the best would be you write an error log other than sending email.
17:42, 28 May 2013 (EEST)
This topic is well covered on the Internet, which is why Somnath provides the links. In particular http://www.geoffhudik.com/tech/2010/10/9/windows-phone-7-error-handling-reporting.html shows how to send an email.
I tried the instructions and they work for sending an email. If you're getting an exception you probably haven't overloaded Application_UnhandledException.
07:42, 29 May 2013 (EEST)
SB Dev -If you want to be completely on the save side you perhaps should write the crash data to isolated storage inside the event and detect the presence of a crash report upon the next launch. That should provide ample opportunity to decide how to proceed (in one of my Apps I tell the User about the crash and wether he wants to help with the improvement of the App by providing a crash report).
talk) 18:00, 3 September 2013 (EEST)(
Hamishwillee - Yes.
That is the approach used by Getting real time crash reports from WP apps using HockeyApp. I quite like the approach of asking people at the point of failure what they want to do rather than have it fail silently - Is this actually "safer", and why?
Either way, it is a valid alternative. I'd add your comment as a note.
talk) 09:51, 6 September 2013 (EEST)(
SB Dev -
The reason is that if you are catching the Exception in the global Exception handler you don't really know what state the application is in. There might be some that won't allow you to send a mail and writing to storage is likely to be simpler in that situation as in "less likely to fail as well". Also it seems some people ran into trouble trying to do this.Of course when people run into trouble in a more defined situation (e.g. you know what went wrong), it's better to ask the user directly how to proceed (e.g. trying to create a file that already exists and asking wether to abort, overwrite or save under another name).
talk) 11:41, 6 September 2013 (EEST)(
Hamishwillee - Fair enoughThanks for the explanation. I've added some words in the "Basic methods" section to cover this case - please check when you have time.
talk) 08:58, 9 September 2013 (EEST)(