Merge pull request #4298 from pourmand1376/catch_all_exceptions

catching all Exceptions!
This commit is contained in:
Jaex 2019-08-29 11:30:54 +03:00 committed by GitHub
commit 9e04fcf4bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,6 +237,7 @@ private static void Main(string[] args)
#if !DEBUG // Allow Visual Studio to break on exceptions in Debug builds.
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
#endif
StartTimer = Stopwatch.StartNew(); // For be able to show startup time