From 344053ff4a85fce10e28fbaf61821b719985ffc5 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Fri, 12 Apr 2024 12:56:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/App.xaml.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/VPet-Simulator.Windows/App.xaml.cs b/VPet-Simulator.Windows/App.xaml.cs index e081f6d..69a9592 100644 --- a/VPet-Simulator.Windows/App.xaml.cs +++ b/VPet-Simulator.Windows/App.xaml.cs @@ -44,10 +44,13 @@ namespace VPet_Simulator.Windows MutiSaves.Add(""); } } - + HashSet ErrorReport = new HashSet(); private void UnhandledException(Exception e, bool isFatality) { var expt = e.ToString(); + if (ErrorReport.Contains(expt)) + return;//防止重复报错 + ErrorReport.Add(expt); if (expt.Contains("MainWindow.Close")) return; else if ((!isFatality && MainWindow != null && ((MainWindow)MainWindow).GameSavesData?.GameSave != null &&