Chapter 10: Error Handling and Troubleshooting
Predicting the future can be a difficult task. But sometimes what's even harder is trying to go back in time and understand the past. In this chapter, we will take a look at how to do both; that is, how to handle anticipated issues in the future and how to best set up our future self to look back in time and understand what happened in the past.
To help get us there, we will cover the following topics and concepts:
- Defensive programming: This is the concept of trying to anticipate bad data coming into your application either from an integration or user entry. Once you've identified and anticipated where those entry points are, you need to find some ways to handle them gracefully.
- Custom error handling: Errors are always going to happen – it's just the nature of software development. But handling them in a way so as not to completely destroy your user experience is important. We will discuss ways to...