| | |
| | | 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 |
| | | { |
| | |
| | | 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 |
| | | { |