protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
DispatcherUnhandledException += App_DispatcherUnhandledException;
}
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
//throw new NotImplementedException();
//错误日志记录
e.Handled = true;
}
捕捉WPF应用程序中未处理的异常
最新推荐文章于 2023-07-19 22:07:50 发布