你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ServiceRemotingExceptionHandler 类

定义

提供对通过远程接口与 Service Fabric 服务通信时遇到的异常的处理。

public class ServiceRemotingExceptionHandler : Microsoft.ServiceFabric.Services.Communication.Client.IExceptionHandler
type ServiceRemotingExceptionHandler = class
    interface IExceptionHandler
Public Class ServiceRemotingExceptionHandler
Implements IExceptionHandler
继承
ServiceRemotingExceptionHandler
实现

注解

异常的处理方式如下所述:

以下异常指示服务故障转移。 这些异常是通过从 方法返回 ExceptionHandlingRetryResult 来处理的 TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult)IsTransientExceptionHandlingRetryResult 属性设置为 false,属性RetryDelay设置为随机值,最高设置为 MaxRetryBackoffIntervalOnNonTransientErrorsMaxRetryCount属性设置为 MaxValue
以下异常指示暂时性错误情况,并通过从 TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult) 方法返回 ExceptionHandlingRetryResult 进行处理。 IsTransientExceptionHandlingRetryResult 属性设置为 true,属性RetryDelay设置为随机值,最高设置为 MaxRetryBackoffIntervalOnTransientErrorsMaxRetryCount属性设置为 MaxValue

构造函数

ServiceRemotingExceptionHandler()

使用默认跟踪 ID 初始化 类的新实例 ServiceRemotingExceptionHandler

ServiceRemotingExceptionHandler(String)

使用指定的跟踪 ID 初始化 类的新实例 ServiceRemotingExceptionHandler

显式接口实现

IExceptionHandler.TryHandleException(ExceptionInformation, OperationRetrySettings, ExceptionHandlingResult)

检查异常并确定如何处理该异常。

适用于