Activity.HandleFault(ActivityExecutionContext, Exception) 方法

定义

此实例的执行上下文中引发了异常时调用。

protected public:
 virtual System::Workflow::ComponentModel::ActivityExecutionStatus HandleFault(System::Workflow::ComponentModel::ActivityExecutionContext ^ executionContext, Exception ^ exception);
protected internal virtual System.Workflow.ComponentModel.ActivityExecutionStatus HandleFault (System.Workflow.ComponentModel.ActivityExecutionContext executionContext, Exception exception);
abstract member HandleFault : System.Workflow.ComponentModel.ActivityExecutionContext * Exception -> System.Workflow.ComponentModel.ActivityExecutionStatus
override this.HandleFault : System.Workflow.ComponentModel.ActivityExecutionContext * Exception -> System.Workflow.ComponentModel.ActivityExecutionStatus
Protected Friend Overridable Function HandleFault (executionContext As ActivityExecutionContext, exception As Exception) As ActivityExecutionStatus

参数

executionContext
ActivityExecutionContext

此实例的 ActivityExecutionContext

exception
Exception

导致此错误的 Exception

返回

ActivityExecutionStatus

试图取消此实例时产生的 ActivityExecutionStatus

例外

executionContext 为空引用(在 Visual Basic 中为 Nothing)。

  • 或 -

exception 为空引用(在 Visual Basic 中为 Nothing)。

注解

默认方法尝试调用 Cancel 方法并返回此尝试的结果。

适用于