Browse Source
Merge pull request #13420 from abpframework/maliming-patch-1
Add `virtual` to the method of `ExceptionFilter` classes.
pull/13422/head
liangshiwei
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs
-
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionPageFilter.cs
|
|
@ -20,7 +20,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling; |
|
|
|
|
|
|
|
|
public class AbpExceptionFilter : IAsyncExceptionFilter, ITransientDependency |
|
|
public class AbpExceptionFilter : IAsyncExceptionFilter, ITransientDependency |
|
|
{ |
|
|
{ |
|
|
public async Task OnExceptionAsync(ExceptionContext context) |
|
|
public virtual async Task OnExceptionAsync(ExceptionContext context) |
|
|
{ |
|
|
{ |
|
|
if (!ShouldHandleException(context)) |
|
|
if (!ShouldHandleException(context)) |
|
|
{ |
|
|
{ |
|
|
|
|
|
@ -25,7 +25,7 @@ public class AbpExceptionPageFilter : IAsyncPageFilter, ITransientDependency |
|
|
return Task.CompletedTask; |
|
|
return Task.CompletedTask; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next) |
|
|
public virtual async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next) |
|
|
{ |
|
|
{ |
|
|
if (context.HandlerMethod == null || !ShouldHandleException(context)) |
|
|
if (context.HandlerMethod == null || !ShouldHandleException(context)) |
|
|
{ |
|
|
{ |
|
|
|