WorkflowRuntime.ServicesExceptionNotHandled 事件

定义

public:
 event EventHandler<System::Workflow::Runtime::ServicesExceptionNotHandledEventArgs ^> ^ ServicesExceptionNotHandled;
public event EventHandler<System.Workflow.Runtime.ServicesExceptionNotHandledEventArgs> ServicesExceptionNotHandled;
member this.ServicesExceptionNotHandled : EventHandler<System.Workflow.Runtime.ServicesExceptionNotHandledEventArgs> 
Public Custom Event ServicesExceptionNotHandled As EventHandler(Of ServicesExceptionNotHandledEventArgs) 
Public Event ServicesExceptionNotHandled As EventHandler(Of ServicesExceptionNotHandledEventArgs) 

事件类型

注解

派生自 WorkflowRuntimeService 该类的服务可以调用 RaiseServicesExceptionNotHandledEvent 该方法,以通知订阅者 ServicesExceptionNotHandled 在其执行过程中无法处理的异常。 可以订阅此事件来实现恢复机制。

当工作流实例尚未由工作流运行时引擎创建且发生异常时,将引发此事件。 在此方案中,通知主机应用程序发生异常的唯一方法是引发此事件。 但是,工作流运行时引擎不会直接调用此引擎。 相反,工作流运行时引擎会向工作流实例传递异常,或者如果没有实例,则会抛回到调用方,在本例中,该调用方实际上是触发此事件的服务。 如果创建自己的持久性或计划程序服务,则必须通过基本 RaiseServicesExceptionNotHandledEvent 方法自行实现此事件。

ServicesExceptionNotHandled对于事件,发送方包含GuidWorkflowRuntimeWorkflowEventArgs正在使用服务的工作流实例以及Exception无法处理的工作流实例。

有关处理事件的详细信息,请参阅 处理和引发事件

适用于