In my opinion, such logic inside the library is not a good idea. I believe that the responsibility for deciding how to deal with exceptions (both processed and unprocessed) should be the responsibility for the application. However, you can see the AppDomain.UnhandledException . You can install such a handler for CurrentDomain and do something there. However, you limit the use of your library (for example, implying that the library will be used in only one domain). You will also receive notifications of all unhandled exceptions, even completely unrelated to your assembly.
, , , , (, UnhandledException, ).