Created
April 19, 2018 19:51
-
-
Save jebarsoba/e35aac734c672d28ffae6cdb029187f3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 async Task Invoke(HttpContext context) | |
| { | |
| try | |
| { | |
| await this.next(context); | |
| } | |
| catch (Exception ex) | |
| { | |
| await HandleExceptionAsync(context, ex); | |
| } | |
| } | |
| private async Task HandleExceptionAsync(HttpContext context, Exception exception) | |
| { | |
| // Populate ExceptionLogEntry... | |
| // Write a new error entry in the logs... | |
| // Return a clean HTTP 500 response to the client... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment