English
Topic 4. Exception handling and debugging programs
Goal: learn to distinguish errors, handle expected exceptions, create custom error types, log failure causes, and find logic errors using PyCharm and pdb.
Lecture contents
- Error types and the exception hierarchy — Error types and diagnostic reports · The built-in exception hierarchy
- Handling and raising exceptions — Execution order of try, except, else, and finally · Raising and propagating exceptions
- Custom exceptions and exception groups — Custom exceptions and responsibility boundaries · Exception groups and notes
- Validation, resources, and logging — Validation, invariants, and resource cleanup · Event logging
- Debugging in PyCharm and pdb — Debugging a program in PyCharm · The pdb debugger and a method for finding errors · Common mistakes