Python · Lesson 9.3 · Pro

Raising errors

Stop bad data early with clear error messages of your own.

In this lesson

  1. raise an error yourself
  2. Pick the right error type
  3. Validate, then trust
  4. Your own error type