Commit 4e4374b
committed
fix(udp): let the emulator timeout reach the caller
_raw_read raised IOError to name a stalled emulator, but _read wraps it in
`except socket.error` -- and on Python 3 IOError, OSError and socket.error
are the same class. The detailed message was therefore caught two frames
later, printed as "Failed to read from device" and collapsed to None, so the
actionable error never reached the caller. The stated goal of the message
could not be met by construction.
Raise EmulatorNotResponding, which deliberately sits outside the OSError
hierarchy, and re-raise it ahead of the socket.error arm.1 parent 63484ad commit 4e4374b
1 file changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
| |||
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
69 | 87 | | |
70 | 88 | | |
71 | 89 | | |
| |||
77 | 95 | | |
78 | 96 | | |
79 | 97 | | |
80 | | - | |
| 98 | + | |
81 | 99 | | |
82 | 100 | | |
83 | 101 | | |
84 | 102 | | |
85 | 103 | | |
86 | 104 | | |
87 | | - | |
| 105 | + | |
88 | 106 | | |
89 | 107 | | |
90 | 108 | | |
| |||
0 commit comments