error handling — when ai's code crashes mid-flight2 / 9
raising errors — making your code fail loudly on purpose
Read the code. divide(10, 0) triggers the raise on line 3. The
caller wraps it in try/except. What prints?
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _