Skip to content

Reference: Error Handling

Quick-lookup pages. Short, dense, and designed to skim — the sort of thing you keep a tab open on while you're coding. If you're here to learn the topic for the first time, start with Learn instead.

Pages in this section

  • Try/except syntax — every valid form of try/except/else/finally, clause ordering, and usage patterns.
  • Built-in exceptions — every built-in exception class, what raises it, and when you might catch it.
  • Exception hierarchy — the full inheritance tree from BaseException down, and where custom exceptions fit.