WcfExceptionHandler Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class provide handling of WCF exceptions encountered in communicating with a service fabric service that is using WCF based communication listener.
public class WcfExceptionHandler : Microsoft.ServiceFabric.Services.Communication.Client.IExceptionHandler
type WcfExceptionHandler = class
interface IExceptionHandler
Public Class WcfExceptionHandler
Implements IExceptionHandler
- Inheritance
-
System.ObjectWcfExceptionHandler
- Implements
Remarks
The exceptions are handled as per the description below:
The following exceptions indicate service failover. These exceptions are handled by returning ExceptionHandlingRetryResult from the TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult) method. The IsTransient property of the ExceptionHandlingRetryResult is set to false, the RetryDelay property is set to a random value up to MaxRetryBackoffIntervalOnNonTransientErrors and MaxRetryCount property is set to System.Int32.MaxValue.
| |
The following exceptions indicate transient error conditions and handled by returning ExceptionHandlingRetryResult from the TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult) method. The IsTransient property of the ExceptionHandlingRetryResult is set to true, the RetryDelay property is set to a random value up to MaxRetryBackoffIntervalOnTransientErrors and MaxRetryCount property is set to System.Int32.MaxValue.
| |
The following exceptions indicate mismatch in the binding or contract between the client and the service. These exceptions are handled by returning ExceptionHandlingThrowResult from the TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult) method.
| |
The following exceptions are indicate an error from the service. They are handled by returning ExceptionHandlingThrowResult from the TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult) method.
| |
All other exceptions that are System.ServiceModel.CommunicationException, but not System.ServiceModel.FaultException are handled by returning ExceptionHandlingRetryResult from the TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult) method. The IsTransient property of the ExceptionHandlingRetryResult is set to true, the RetryDelay property is set to a random value up to MaxRetryBackoffIntervalOnTransientErrors and MaxRetryCount property is set to DefaultMaxRetryCountForTransientErrors. |
Constructors
WcfExceptionHandler() |
Initializes a new instance of the WcfExceptionHandler class. |
Explicit Interface Implementations
IExceptionHandler.TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult) |
Method that examines the exception and determines how that exception can be handled. |