summaryrefslogtreecommitdiff
path: root/extmod
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 /extmod
parent89797fd3f9d36cd7e2e7a125dbbe02f598874060 (diff)
Combine 'index out of range' messages
Diffstat (limited to 'extmod')
-rw-r--r--extmod/moductypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index a384f1e2c..dc8ac4c72 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -520,7 +520,7 @@ STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t base_in, mp_obj_t index_in, mp_ob
uint val_type = GET_TYPE(arr_sz, VAL_TYPE_BITS);
arr_sz &= VALUE_MASK(VAL_TYPE_BITS);
if (index >= arr_sz) {
- nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, translate("struct: index out of range")));
+ mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_struct);
}
if (t->len == 2) {