DispatcherUnhandledExceptionFilterEventArgs.RequestCatch Proprietà

Definizione

Ottiene o imposta se l'eccezione deve essere rilevata e i gestori eventi devono essere chiamati.

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

Valore della proprietà

true se gli eventi UnhandledException devono essere generati; in caso contrario, false. Il valore predefinito è true.

Commenti

L'evento UnhandledExceptionFilter fornisce un mezzo per non generare l'evento UnhandledException . L'oggetto UnhandledException viene generato per primo e Se RequestCatch su è impostato su false, l'evento DispatcherUnhandledExceptionFilterEventArgsUnhandledException non verrà generato.

Un gestore precedente nel multicast eventi potrebbe avere già impostato questa proprietà su false, che indica che l'eccezione non verrà rilevata. Il comportamento "don't catch" eseguirà l'override di tutti gli altri perché probabilmente significa uno scenario di debug.

Si applica a

Vedi anche