Dispatcher.UnhandledExceptionFilter 事件

定義

發生於在篩選階段擲回執行緒例外狀況且透過 InvokeBeginInvoke 執行委派期間無法攔截時。

public:
 event System::Windows::Threading::DispatcherUnhandledExceptionFilterEventHandler ^ UnhandledExceptionFilter;
[add: System.Security.SecurityCritical]
[remove: System.Security.SecurityCritical]
public event System.Windows.Threading.DispatcherUnhandledExceptionFilterEventHandler UnhandledExceptionFilter;
public event System.Windows.Threading.DispatcherUnhandledExceptionFilterEventHandler UnhandledExceptionFilter;
[<add: System.Security.SecurityCritical>]
[<remove: System.Security.SecurityCritical>]
member this.UnhandledExceptionFilter : System.Windows.Threading.DispatcherUnhandledExceptionFilterEventHandler 
member this.UnhandledExceptionFilter : System.Windows.Threading.DispatcherUnhandledExceptionFilterEventHandler 
Public Custom Event UnhandledExceptionFilter As DispatcherUnhandledExceptionFilterEventHandler 

事件類型

屬性

備註

此事件會在篩選階段期間引發,而例外狀況是在委派執行期間透過 InvokeBeginInvoke 引發且未攔截。

此時呼叫堆疊不會復原, (第一次發生例外狀況) 。

必須小心撰寫此事件的事件處理常式,以避免建立次要例外狀況,並攔截任何發生的情況。 建議您避免在處理常式中配置記憶體或執行任何耗用大量資源的作業。

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

適用於

另請參閱