ComponentBase.DispatchExceptionAsync(Exception) Method

Definition

Treats the supplied exception as being thrown by this component. This will cause the enclosing ErrorBoundary to transition into a failed state. If there is no enclosing ErrorBoundary, it will be regarded as an exception from the enclosing renderer.

This is useful if an exception occurs outside the component lifecycle methods, but you wish to treat it the same as an exception from a component lifecycle method.

protected System.Threading.Tasks.Task DispatchExceptionAsync (Exception exception);
member this.DispatchExceptionAsync : Exception -> System.Threading.Tasks.Task
Protected Function DispatchExceptionAsync (exception As Exception) As Task

Parameters

exception
Exception

The Exception that will be dispatched to the renderer.

Returns

A Task that will be completed when the exception has finished dispatching.

Applies to