clarify wrong number of arguments error message

This commit is contained in:
Yuichi Nishiwaki 2014-02-11 13:52:03 +09:00
parent 7843dc1023
commit 93e7a1cf32
1 changed files with 1 additions and 1 deletions

View File

@ -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 */