I know how to catch all unhandled exceptions in a given thread, but wondering if there is a way to catch all unhandled exceptions thrown by a given class instead of wrapping each of the calls in a try catch block.
In case there's no way of doing this (likely to be the case) how would you achieve the same effect?
Just to give a bit of context, I am using a custom coded service proxy that decouples the rest of the app from the service data contract (WCF). I basically need to catch the faults so that I can extract specific fields (inner descriptions etc.), package them up into an custom exception and throw it again.
Any help appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…