IExceptionHandler Interface


Represents an interface for handling exceptions in ASP.NET Core applications. IExceptionHandler implementations are used by the exception handler middleware.

public interface IExceptionHandler
type IExceptionHandler = interface
Public Interface IExceptionHandler


TryHandleAsync(HttpContext, Exception, CancellationToken)

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.

Applies to