How to Catch Exceptions in WPF when Calling a WCF Sevive
A:
Hi Hui, I think this has already been covered by this question on stack overflow. WPF Exceptions
Bob.
scope_creep
2009-12-09 23:52:57
+1
A:
Basically you'll have three approaches:
- Rethrow
FaultException
on your regular try/catch - Mark your
OperationContract
withFaultContract
attribute and translate your Exception to your custom Fault object, manually - To implement a
IErrorHandler
behavior and let it handle WCF exceptions to you
This link can explain these options: Simplifying WCF: Using Exceptions as Faults
Rubens Farias
2009-12-10 00:10:52