From 67e868f55f9f2a03ff430ac5181f973486372d2d Mon Sep 17 00:00:00 2001 From: Ivandro Ismael Date: Thu, 1 Sep 2016 00:49:24 +0100 Subject: [PATCH] [Program] - Only catch Application/AppDomain execptions if not in DEBUG Config-mode. --- src/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Program.cs b/src/Program.cs index aacd42190..4059986af 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -14,6 +14,8 @@ namespace Nikse.SubtitleEdit [STAThread] private static void Main() { + +#if !DEBUG // Add the event handler for handling UI thread exceptions to the event. Application.ThreadException += Application_ThreadException; @@ -21,7 +23,8 @@ namespace Nikse.SubtitleEdit Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); // Add the event handler for handling non-UI thread exceptions to the event. - AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; +#endif Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false);