DispatcherUnhandledExceptionFilterEventArgs.RequestCatch 屬性

定義

取得或設定值,這個值表示是否應攔截例外狀況並呼叫事件處理常式。

public:
 property bool RequestCatch { bool get(); void set(bool value); };
public bool RequestCatch { get; set; }
member this.RequestCatch : bool with get, set
Public Property RequestCatch As Boolean

屬性值

如果應該要引發 UnhandledException 則為 true,否則為 false。 預設值是 true

備註

事件 UnhandledExceptionFilter 提供一種方法來不引發 UnhandledException 事件。 會 UnhandledException 先引發 ,如果 RequestCatch 上的 DispatcherUnhandledExceptionFilterEventArgs 設定為 falseUnhandledException 則不會引發 事件。

事件多播中的先前處理常式可能已經將此屬性設定為 false ,表示不會攔截例外狀況。 「不攔截」行為會覆寫所有其他行為,因為它很可能表示偵錯案例。

適用於

另請參閱