Learn how exception loggers make it easy to log unhandled exceptions.
- [Instructor] So far, we have looked at handling exceptions…in ways that also return a response.…Sometimes, you want to simply log exceptions,…and not actually change the HTTP response at all.…Web API allows us do that,…with something appropriately called exception loggers.…Lets look now at how they work and how to create one.…It's important to understand that any unhandled exception,…that gets thrown within a controller,…will trigger our application's exception logger.…There's a special case where that's not true though.…
Any HTTP response exceptions,…that we throw in our controllers,…won't trigger the exception logger.…And this is by design since these exceptions…aren't really true exceptions,…but instead are a way to send a specific HTTP response.…It's also worth noting,…that you can only have a single exception logger…in your application.…So, it needs to be generic enough to handle logging…all kinds of different exceptions that might come up…in your application.…Let's create a sample exception logger,…so you can see how they work.…
AuthorJonathan "J." Tower
- Convention-based routing
- Binding your code to an HTTP request
- Validating models
- Using attributes to route requests
- Customizing attribute routes
- Data serialization and model binding
- Error handling
- Using exception filters and exception loggers
- API documentation and testing
- Securing your API
Skill Level Beginner
ASP.NET MVC: HTTP Request Life Cyclewith Janan Siam2h 15m Advanced
1. Controllers and Actions
3. Data Serialization and Model Binding
4. Error Handling
5. API Documentation and Testing
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.