try: raise ExceptionGroup("problem", [BlockingIOError()]) except* OSError as e: # Would catch the error print(repr(e)) except* BlockingIOError: # Would never run print('never')