Fet*_*mos 3 c# unhandled-exception hockeyapp .net-native uwp
我为Windows 10桌面创建了uwp app(.Net native).我使用HockeyApp收集实时崩溃报告.堆栈跟踪不提供信息.这是一个长期存在的问题,并没有解决方案.我尝试了这个,但它不起作用.我得到以下例外:
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
Arg_NullReferenceException
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected
The parameter is incorrect. The parameter is incorrect.
Run Code Online (Sandbox Code Playgroud)
在我的计算机上,应用程序运行稳定.也许这是由于Windows的版本.我认为这是由于我的xaml.对我来说纠正这些错误非常重要.但我不能拒绝这张桌子.任何想法如何找到这些错误的来源?
对不起,这可能不是答案,但我在评论栏中没有足够的空间.
请尝试以下内容App.xaml.cs.为这些事件添加处理程序,看看他们是否向您报告崩溃事件.
public App()
{
UnhandledException += OnUnhandledException;
TaskScheduler.UnobservedTaskException += OnUnobservedException;
InitializeComponent();
}
private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
// Occurs when an exception is not handled on the UI thread.
// if you want to suppress and handle it manually,
// otherwise app shuts down.
e.Handled = true;
}
private static void OnUnobservedException(object sender, UnobservedTaskExceptionEventArgs e)
{
// Occurs when an exception is not handled on a background thread.
// ie. A task is fired and forgotten Task.Run(() => {...})
// suppress and handle it manually.
e.SetObserved();
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
742 次 |
| 最近记录: |