Chapter 10
Dealing with Errors
IN THIS CHAPTER
Understanding error sources
Handling error conditions
Specifying that an error has occurred
Developing your own error indicators
Performing tasks even after an error occurs
Most application code of any complexity has errors in it. When your application suddenly freezes for no apparent reason, that’s an error. Seeing one of those obscure message dialog boxes is another kind of error. However, errors can occur that don’t provide you with any sort of notification. An application might perform the wrong computation on a series of numbers you provide, resulting in incorrect output that you may never know about unless someone tells you that something is wrong or you check for the issue yourself. Errors need not be consistent, either. You may see them on some occasions and not on others. For example, an error can occur only when the weather is bad or the network is overloaded. In short, errors occur in all sorts of situations and for all sorts ...
Get Beginning Programming with Python For Dummies, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.