Summary
Explore how to manage exceptions in Python to build more robust applications. Understand raising exceptions, using try-except blocks, the exception hierarchy, and defining custom exceptions to handle errors effectively.
Recall
Some key points in this chapter:
- Raising an exception happens when something goes wrong. We looked at division by zero as an example. Exceptions can also be raised with the
raisestatement. - The effects of an exception are to interrupt the normal sequential execution of statements.