Is there a global exception handler in Windows store apps?

后端 未结 1 863
我在风中等你
我在风中等你 2020-12-31 04:40

For unhandled exceptions, at least, I\'d like to be able to catch the details and write them out to a file for potential subsequent \"debugging forensics.\" There is no \"On

相关标签:
1条回答
  • 2020-12-31 04:51

    For HTML5/JavaScript apps you have the onerror event as your last chance to capture info.

    For XAML-based apps, you can use UnhandledException; however, that only captures exceptions that come up through the XAML (UI) framework and you don't always get a lot of information about what the root cause is, even in InnerException.

    Update for Windows 8.1: UnhandledException also will capture exceptions that are created by an async void method. In Windows 8, such exceptions would just crash the app. LunarFrog has a good discussion of this on their website.

    0 讨论(0)
提交回复
热议问题