So far, I just put a try / catch block around Application.Run at the entry point of Program.cs into the program. This complicates all exceptions in debug mode quite a bit, but when I run the program without debug mode, the exceptions are no longer handled. I get an unhandled exception field.
I do not want this to happen. I want all exceptions to be caught when working in non-debug mode. A program has several threads, and preferably all exceptions to them fall into the same handler; I want to register exceptions in the database. Does anyone have any advice on how to do this?
debugging c # winforms unhandled-exception
Isaac Bolinger Apr 23 2018-11-11T00: 00Z
source share