I want my WCF service to be able to return some known faults. ie a defined FaultContract
I'm a bit confused as to whether I should be deriving my own FaultException
subclass, or creating a detail class and using FaultException<TDetail>
.
There appear to be examples of both scattered about and I just wondered what the general consensus was.
I'm leaning towards deriving, since I think that client code would look cleaner catching MyException
rather than WCF centric FaultException<MyExceptionDetail>
, but I don't really have any strong feelings about it.