| 1 |
# flags: --minimum-version=3.11 |
| 2 |
try: |
| 3 |
raise OSError("blah") |
| 4 |
except* ExceptionGroup as e: |
| 5 |
pass |
| 6 |
|
| 7 |
|
| 8 |
try: |
| 9 |
async with trio.open_nursery() as nursery: |
| 10 |
# Make two concurrent calls to child() |
| 11 |
nursery.start_soon(child) |
| 12 |
nursery.start_soon(child) |
| 13 |
except* ValueError: |
| 14 |
pass |
| 15 |
|
| 16 |
try: |
| 17 |
try: |
| 18 |
raise ValueError(42) |
| 19 |
except: |
| 20 |
try: |
| 21 |
raise TypeError(int) |
| 22 |
except* Exception: |
| 23 |
pass |
| 24 |
1 / 0 |
| 25 |
except Exception as e: |
| 26 |
exc = e |
| 27 |
|
| 28 |
try: |
| 29 |
try: |
| 30 |
raise FalsyEG("eg", [TypeError(1), ValueError(2)]) |
| 31 |
except* TypeError as e: |
| 32 |
tes = e |
| 33 |
raise |
| 34 |
except* ValueError as e: |
| 35 |
ves = e |
| 36 |
pass |
| 37 |
except Exception as e: |
| 38 |
exc = e |
| 39 |
|
| 40 |
try: |
| 41 |
try: |
| 42 |
raise orig |
| 43 |
except* (TypeError, ValueError) as e: |
| 44 |
raise SyntaxError(3) from e |
| 45 |
except BaseException as e: |
| 46 |
exc = e |
| 47 |
|
| 48 |
try: |
| 49 |
try: |
| 50 |
raise orig |
| 51 |
except* OSError as e: |
| 52 |
raise TypeError(3) from e |
| 53 |
except ExceptionGroup as e: |
| 54 |
exc = e |