identificationOfCultivatedL.../OpenAuth.WebApi/Model/GlobalExceptionFilter.cs

16 lines
483 B
C#
Raw Permalink Normal View History

2026-02-04 10:30:49 +08:00
using Microsoft.AspNetCore.Mvc.Filters;
namespace OpenAuth.WebApi.Model
{
public class GlobalExceptionFilter : IExceptionFilter
{
public void OnException(ExceptionContext context)
{
var exception = context.Exception;
var actionDescriptor = context.ActionDescriptor;
// 记录异常和参数
//Log.Error(exception, "Unhandled exception occurred in {Action}", actionDescriptor.DisplayName);
}
}
}