How can I write a catch handler for all exceptions in a class library project in C # that will provide the external caller with only one custom exception for any exception that occurs in the library.
The closest solution I found is to implement the Facade class, call the low-level classes from it and write try..catch in every call from Facade that will throw one custom exception if any exception occurs under it.
I was looking for solutions, but I got it only for web applications (using the application context to throw exceptions) for example How do I implement a single catch'em all exception summary handler?
I need to implement it at the class library level or at the library library level, but it is good if you can do this by writing instructions for handling minimal exceptions.
source share