zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import _common
 
import trio
 
 
def exc1_fn():
    try:
        raise ValueError
    except Exception as exc:
        return exc
 
 
def exc2_fn():
    try:
        raise KeyError
    except Exception as exc:
        return exc
 
 
# This should be printed nicely, because Trio overrode sys.excepthook
raise trio.MultiError([exc1_fn(), exc2_fn()])