GlobalExceptionHandlerTryHandleAsync Method

Tries to handle the specified exception asynchronously within the ASP.NET Core pipeline. Implementations of this method can provide custom exception-handling logic for different scenarios.

Definition

Namespace: MobileTrack.Web.Portal
Assembly: MobileTrack.Web.Portal (in MobileTrack.Web.Portal.exe) Version: 0.7+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
public ValueTask<bool> TryHandleAsync(
	HttpContext httpContext,
	Exception exception,
	CancellationToken cancellationToken
)

Parameters

httpContext  HttpContext
The HttpContext for the request.
exception  Exception
The unhandled exception.
cancellationToken  CancellationToken
The cancellation token.

Return Value

ValueTaskBoolean
A task that represents the asynchronous read operation. The value of its Result property contains the result of the handling operation. if the exception was handled successfully; otherwise .

Implements

IExceptionHandlerTryHandleAsync(HttpContext, Exception, CancellationToken)

See Also