Is it possible to catch exceptions in a single place in a c# class file?
I'm coding some unit tests in NUnit to test for a WCF Web-Service, and on all methods/tests want to trap a "EndpointNotFoundException" without having to code this for each test.
I guess i wanted to create a descriptive error in this case without having to put an additional catch block in each method, as i do indeed want the test to fail.
As i've done something similar to this in WCF with the FaultException i was interested to know if it was possible in general with C# classes
But the bottom line is that if it fails, it fails! thanks to @TrueWill for stating the obvious ;) and to @Abhijeet Patel for making me think more about how i structure my unit tests
(oh, and apologies for answering my own question ;)</div