Skip to content

Commit 9019710

Browse files
committed
protomatter: improve an error message
1 parent b1fab1c commit 9019710

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-bindings/_protomatter/Protomatter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ STATIC uint8_t validate_pin(mp_obj_t obj) {
5454
STATIC void validate_pins(qstr what, uint8_t* pin_nos, mp_int_t max_pins, mp_obj_t seq, uint8_t *count_out) {
5555
mp_int_t len = MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq));
5656
if (len > max_pins) {
57-
mp_raise_ValueError_varg(translate("At most %d %q may be specified"), max_pins, what);
57+
mp_raise_ValueError_varg(translate("At most %d %q may be specified (not %d)"), max_pins, what, len);
5858
}
5959
*count_out = len;
6060
for (mp_int_t i=0; i<len; i++) {

0 commit comments

Comments
 (0)