Class HttpGlobalExceptionFilter
Namespace: Common.Filters
Assembly: Common.dll
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public sealed class HttpGlobalExceptionFilter : IExceptionFilter, IFilterMetadata
Inheritance
object ← HttpGlobalExceptionFilter
Implements
Inherited Members
object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)
Constructors
HttpGlobalExceptionFilter\(IWebHostEnvironment, ILogger<HttpGlobalExceptionFilter\>\)
HttpGlobalExceptionFilter that handles System.Exception thrown when executing an action.
public HttpGlobalExceptionFilter(IWebHostEnvironment env, ILogger<HttpGlobalExceptionFilter> logger)
Parameters
Web host environment.
logger ILogger
Logger of the project, Serilog.
Methods
OnException\(ExceptionContext\)
Called after an action has thrown an System.Exception.
public void OnException(ExceptionContext context)
Parameters
context ExceptionContext
The Microsoft.AspNetCore.Mvc.Filters.ExceptionContext.
Last modified: 21 May 2024