summaryrefslogtreecommitdiffstatshomepage
path: root/py/bc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/bc.c')
-rw-r--r--py/bc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/py/bc.c b/py/bc.c
index 47f8d9f713..bbc9a207d3 100644
--- a/py/bc.c
+++ b/py/bc.c
@@ -62,9 +62,8 @@ mp_uint_t mp_decode_uint(const byte **ptr) {
STATIC NORETURN void fun_pos_args_mismatch(mp_obj_fun_bc_t *f, mp_uint_t expected, mp_uint_t given) {
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
- // Generic message, to be reused for other argument issues
- nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError,
- "argument num/types mismatch"));
+ // generic message, used also for other argument issues
+ mp_arg_error_terse_mismatch();
#elif MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError,
"function takes %d positional arguments but %d were given", expected, given));