Robots Atlas>ROBOTS ATLAS

Python โ€” From Basics to Advanced ยท Exceptions โ€” Advanced

Custom Exception Hierarchies and ExceptionGroup

Exceptions โ€” Advanced

Introduction

Designing custom exception classes: one shared base for a library, subclasses for concrete problems, custom attributes (code, retry_after) instead of parsing the message. Python 3.11+ adds ExceptionGroup and the "except*" syntax for concurrent tasks.