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()])
|
|