File size: 393 Bytes
60f5111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
try:
    raise ExceptionGroup(
        "eg",
        [
            ValueError(1),
            TypeError(2),
            OSError(3),
            ExceptionGroup(
                "nested",
                [OSError(4), TypeError(5), ValueError(6)])
        ]
    )
except* ValueError as e:
    print(f'*ValueError: {e!r}')
    raise e
except* OSError as e:
    print(f'*OSError: {e!r}')
    raise