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
throw new ArgumentNullException("playlist is empty");
How can I catch it globally?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With