WCF provides a built-in interface called
IErrorHandler for handling exceptions occurring within the WCF service operations processing pipeline. By using the
IErrorHandler interface, you can capture those unhandled exceptions during service operation execution and return a customized
FaultException object to the client.
However, if you feel
IErrorHandler is not flexible or powerful enough, you can consider creating your own generic error-handling component, which can handle the exceptions occurring during the execution of certain WCF operations at the server side. In this recipe, we will demonstrate how to use the
IOperationInvoker extension point to implement a custom operation error-handling ...