Improve error message when calling a keyword with the wrong number of arguments

Description

When you call a Keyword with the wrong number of arguments, the error message does not report how many arguments were passed:

compare to calling an IFn, which does show the number of arguments passed:

The latter error message is more clear and makes it easier to debug.

The attached patch re-uses the ArityException class used elsewhere to generate error messages in the latter form when calling a keyword with the wrong number of arguments.

Addresses CLJ-1067

Patch: keyword-arity-exception-03.patch

Screened by: Alex Miller

Environment

None

Activity

Show:
Marc O'Morain
September 17, 2018, 5:22 PM

Thanks Alex

Alex Miller
September 17, 2018, 2:32 PM

I've screened, but I'm not sure we'll look at it for 1.10. I will rebase if needed, no big deal.

Marc O'Morain
September 17, 2018, 10:13 AM

Hi Alex,

Any update on this ticket? I’m anxious to avoid having to rebase the patch against master again.

Marc

Alex Miller
July 20, 2018, 11:08 PM

I’ll get to it next time I cycle through.

Marc O'Morain
July 20, 2018, 1:02 PM

Hi Alex, any update on this ticket? I've updated the patch to the latest master as requested, so it should be good to merge now.

Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Marc O'Morain

Labels

Approval

Screened

Patch

Code and Test

Priority

Minor

Affects versions

Fix versions