Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 688 Bytes

File metadata and controls

28 lines (19 loc) · 688 Bytes

Module 057: Custom Exceptions

  • Phase: 6. Advanced OOP & Errors
  • Duration: 1 hour

Learning Objectives

  • Create custom exception classes by inheriting from Exception
  • Add attributes and methods to custom exceptions
  • Build exception hierarchies
  • Catch custom exceptions selectively
  • Decide when to create custom exceptions

Topics Covered

  • Inheriting from Exception and its subclasses
  • Adding attributes (error codes, messages)
  • Exception hierarchies for libraries
  • Raising and catching custom exceptions
  • When custom exceptions improve code clarity

Prerequisites

Module 056: Error Handling

Next Module

Module 058: Reading and Writing Text Files