Merge pull request #1936 from ivandrofly/program

[Program] - Only catch Application/AppDomain execptions if not in DEBUG Config-mode.
This commit is contained in:
Nikolaj Olsson 2016-09-01 05:24:50 +02:00 committed by GitHub
commit 0947504697

View File

@ -14,6 +14,8 @@ namespace Nikse.SubtitleEdit
[STAThread] [STAThread]
private static void Main() private static void Main()
{ {
#if !DEBUG
// Add the event handler for handling UI thread exceptions to the event. // Add the event handler for handling UI thread exceptions to the event.
Application.ThreadException += Application_ThreadException; Application.ThreadException += Application_ThreadException;
@ -22,6 +24,7 @@ namespace Nikse.SubtitleEdit
// Add the event handler for handling non-UI thread exceptions to the event. // 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.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);