You can add an event handler to AppDomain.UnhandledException event, and it’ll be called when a exception is thrown and not caught.
You can add an event handler to AppDomain.UnhandledException event, and it’ll be called when a exception is thrown and not caught.