Skip to main content

DispatcherUnhandledExceptionFilterEventArgs Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

Represents the method that will handle the Avalonia.Threading.Dispatcher.UnhandledExceptionFilter event.

public class DispatcherUnhandledExceptionFilterEventArgs

Inheritance: EventArgs -> DispatcherEventArgs -> DispatcherUnhandledExceptionFilterEventArgs

Properties

NameDescription
ExceptionGets the exception that was raised when executing code by way of the dispatcher.
RequestCatchGets or sets whether the exception should be caught and the event handlers called..
DispatcherThe Dispatcher associated with this event. Inherited from DispatcherEventArgs.

Exception Property

Gets the exception that was raised when executing code by way of the dispatcher.

public Exception Exception { get; set; }

RequestCatch Property

Gets or sets whether the exception should be caught and the event handlers called..

public bool RequestCatch { get; set; }

Remarks

A filter handler can set this property to false to request that the exception not be caught, to avoid the callstack getting unwound up to the Dispatcher.

A previous handler in the event multicast might have already set this property to false, signalling that the exception will not be caught. We let the "don't catch" behavior override all others because it most likely means a debugging scenario.