From 13e336388e5978749e88be829d1465a2350c5645 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期二, 21 一月 2025 12:33:01 +0800 Subject: [PATCH] 增加VMO异常处理 --- Desktop/HStation.Desktop.Xhs.Core/Program.cs | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Desktop/HStation.Desktop.Xhs.Core/Program.cs b/Desktop/HStation.Desktop.Xhs.Core/Program.cs index fc879d3..a11f8b4 100644 --- a/Desktop/HStation.Desktop.Xhs.Core/Program.cs +++ b/Desktop/HStation.Desktop.Xhs.Core/Program.cs @@ -97,11 +97,12 @@ private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { var ex = e.Exception; - if (ex is Yw.Dto.InternalException internalEx) + if (ex is Yw.Vmo.VException internalEx) { - Yw.LogHelper.Error("系统出现内部异常,ERROR:249", internalEx); - MessageBoxHelper.ShowError(internalEx.ErrorMsg); + var dlg = new Yw.WinFrmUI.VmoExceptionInfoDlg(); + dlg.SetBindingData(internalEx); + dlg.ShowDialog(); } else { @@ -113,10 +114,12 @@ private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { var ex = e.ExceptionObject as Exception; - if (ex is Yw.Dto.InternalException internalEx) + if (ex is Yw.Vmo.VException internalEx) { Yw.LogHelper.Error("系统出现内部异常,ERROR:249", internalEx); - MessageBoxHelper.ShowError(internalEx.ErrorMsg); + var dlg = new Yw.WinFrmUI.VmoExceptionInfoDlg(); + dlg.SetBindingData(internalEx); + dlg.ShowDialog(); } else { -- Gitblit v1.9.3