summaryrefslogtreecommitdiff
path: root/ports/stm
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-08-04 11:27:36 -0500
committerJeff Epler <jepler@gmail.com>2020-08-04 14:45:45 -0500
commitc849b781c0186d93a1165784ce4e22d2178d5ccb (patch)
tree650b9259a33d12a64e3f826267da3aa4968b1b84 /ports/stm
parent89797fd3f9d36cd7e2e7a125dbbe02f598874060 (diff)
Combine 'index out of range' messages
Diffstat (limited to 'ports/stm')
-rw-r--r--ports/stm/common-hal/pulseio/PulseIn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm/common-hal/pulseio/PulseIn.c b/ports/stm/common-hal/pulseio/PulseIn.c
index b43fdd554..a667cf010 100644
--- a/ports/stm/common-hal/pulseio/PulseIn.c
+++ b/ports/stm/common-hal/pulseio/PulseIn.c
@@ -249,7 +249,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t* self, int16_
}
if (index < 0 || index >= self->len) {
HAL_NVIC_EnableIRQ(self->irq);
- mp_raise_IndexError(translate("index out of range"));
+ mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_PulseIn);
}
uint16_t value = self->buffer[(self->start + index) % self->maxlen];
HAL_NVIC_EnableIRQ(self->irq);