Please enable JavaScript to use CodeHS

PCAP Certification Prep

Advanced Exceptions

The exception hierarchy, handler variants, raising exceptions, assertions, and self-defined exceptions.

Lessons

3.1 The Exception Hierarchy and Handler Variants

  • The Exception Hierarchy and Handler Variants
  • Handler Variants in Action
  • Order the Handlers
  • Fix the Bug: Misspelled Handler
  • Quick Check: The Exception Hierarchy

3.2 Raising Exceptions and Assertions

  • Raising Exceptions and Assertions
  • raise, assert, and args
  • Validate with raise and assert
  • Fix the Bug: The raise Call
  • Quick Check: Raising and Asserting

3.3 Defining Your Own Exceptions

  • Defining Your Own Exceptions
  • A Custom Exception Hierarchy
  • Bank Account Exceptions
  • Fix the Bug: Bare Exception Class
  • Quick Check: Custom Exceptions

3.4 Exceptions Quiz

  • Advanced Exceptions Quiz

Courses that include this module