From 93e7a1cf32bba8b1a510dc8c6958b52923f3cc99 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 11 Feb 2014 13:52:03 +0900 Subject: [PATCH] clarify wrong number of arguments error message --- src/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm.c b/src/vm.c index 9e1c465c..6c524ce8 100644 --- a/src/vm.c +++ b/src/vm.c @@ -585,7 +585,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv) if (ci->argc != proc->u.irep->argc) { if (! (proc->u.irep->varg && ci->argc >= proc->u.irep->argc)) { - pic_error(pic, "wrong number of arguments"); + pic_errorf(pic, "wrong number of arguments (%d for %d%s)", ci->argc - 1, proc->u.irep->argc - 1, (proc->u.irep->varg ? "+" : "")); } } /* prepare rest args */