I think there was a component that allowed to create global error handling.
For example I myself throw exception when something bad happens, for example
You can accomplish this either through AppDomain.UnhandledException or Application.ThreadException.
See the documentation for more details on what these events do and what the difference is for these events. The idea is that AppDomain.UnhandledException
always works. Application.ThreadException
is specifically for unhandled UI exceptions.