We have a system with a WCF layer.
The WCF services can throw various FaultExceptions, these are exceptions of type:
FaultException<MyStronglyTypedException>
All strongly types exceptions inherit from a base exception.
public class MyStronglyTypedException : MyBaseException
I can catch FaultException, but then I do not have access to the Detail property of FaultException.
What I would like to catch is:
FaultException<MyBaseException>
But this does not seem to be possible.
Is there a way that I can get access to the Detail property of the FaultException, without catching every individual strongly typed exception?