We have a desktop application and are using a third party that wrote by C++. We are using the library's methods in our whole application.
We have handled AppDomain.CurrentDomain.UnhandledException and Application.ThreadException events for catching the unhandled exceptions, and we are expecting to catch all the exceptions in the UnhandledException event. Now the problem is when some methods in the library throw an exception, UnhandledException and ThreadException events can not catch the exception, and the entire application crashes.
Why don't we use "try/catch"? Because there are a lot of classes that use the library, and we are looking for a general solution to the problem.
Question: Why can we not catch the exception in UnhandledException event which raises from the method uses the library's methods?
Request: Is there any way to catch the exceptions on a general scale?
Thank you so much for your attention and participation.