关于[Global Error Handling in ASP.NET Core MVC]的摘要:
When generating a new MVC app the ExceptionHandler middleware is provided by default. This will catch any unhandled exceptions within your application and allow you to redirect to a specified route if you so choose. But what about other non-success status codes? Errors such as 404s will not be captured by this middleware as no exception was thrown.
原文地址: https://codedaze.io/global-error-handling-aspnet-core-mvc/