Performing Error Handling
In This Chapter
Defining the nature of errors
Catching errors in your code
Telling others about errors
Fortunately, it’s also possible to do something about errors. You can use a three-step process to make errors less frightening:
1. You need to know more about the nature of errors. Knowing what causes errors in the first place can help you avoid them. Previous chapters in this book provide some examples of how you can avoid errors by doing things like checking the input type of data and validating that the data range falls within the limits you expected.
2. After you come to understand errors better, you need to know how to catch them, which means intercepting them before they become a problem. After you catch the error, ...