Created
April 20, 2021 21:39
-
-
Save ankitvijay/d76a0b04b4b76a71be8bed9f4575df6a to your computer and use it in GitHub Desktop.
Register ExceptionHandler and ApplicationExceptionHandler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup | |
{ | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
. | |
. | |
services.AddSingleton<IExceptionHandler, ExceptionHandler>(); | |
. | |
. | |
} | |
public void Configure(IApplicationBuilder app) | |
{ | |
app.UseMiddleware<ApplicationExceptionMiddleware>(); | |
. | |
. | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment