Py

Errors & Exceptions

Module 10 of 14, Intermediate
🛟

Errors & Exceptions

Read tracebacks, handle exceptions, raise your own and debug with confidence.

0 of 6 lessons complete

6 lessons, 56 min

Start module

Lessons

1

Reading tracebacks

Decode Python's error reports to find bugs fast.

8 min
2

Common exception types

Meet the errors you'll see most and what usually causes them.

9 min
3

Catching exceptions

Handle errors gracefully with try/except instead of crashing.

10 min
4

else and finally

Run code only on success, and clean up no matter what.

8 min
5

Raising & custom exceptions

Signal problems with raise, validate input and define your own errors.

12 min
6

Debugging strategies

Hunt down wrong answers with print debugging, repr and assert.

9 min
🏗️
Next module

Classes & Objects