From 9cdb8bb42bfecb4dcfc1c059ea0f0a65869f9844 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Thu, 19 Mar 2020 10:58:32 -0400 Subject: [PATCH] don't catch just any exception while debugging since this screws up the call stack trace --- CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs b/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs index 91c71640..f34527b8 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs @@ -275,6 +275,7 @@ namespace UniversalEditor.UserInterface NewDialog dlg = new NewDialog(); dlg.Mode = NewDialogMode.File; + if (dlg.ShowDialog() == DialogResult.OK) { iUntitledDocCount++; @@ -511,6 +512,7 @@ namespace UniversalEditor.UserInterface } return; } +#if !DEBUG catch (Exception ex) { if (!System.Diagnostics.Debugger.IsAttached) @@ -524,6 +526,7 @@ namespace UniversalEditor.UserInterface throw ex; } } +#endif } Editor editor = editors[0].Create();