Skip to content

Commit c215ca2

Browse files
committed
pybricks/util_pb/pb_task: use MP_UNREACHABLE
Any statements after raising an exception are unreachable, so the nlr_pop() was never called. Instead replace it with MP_UNREACHABLE to be explicit about what is going on here.
1 parent 15b124f commit c215ca2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pybricks/util_pb/pb_task.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void pb_wait_task(pbio_task_t *task, mp_int_t timeout) {
3737
}
3838

3939
mp_raise_OSError(MP_ETIMEDOUT);
40-
nlr_pop();
40+
MP_UNREACHABLE
4141
} else {
4242
pbio_task_cancel(task);
4343

0 commit comments

Comments
 (0)