summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2013-07-21 12:05:46 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2013-07-21 12:05:46 +0200
commitbe740b5618753fff918f75df293081a7560891fd (patch)
tree736592edc2e7d1837adcc894269ec93c0cecd567
parent9c61c01616c5d2ad3f4b4fbd3644752a85cf2692 (diff)
LAMBDA: Give more precise descriptions of argument count errors.
-rw-r--r--sb-eval2.lisp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp
index f1aef25..7770222 100644
--- a/sb-eval2.lisp
+++ b/sb-eval2.lisp
@@ -603,8 +603,8 @@
missing-optionals
(unless (>= argi required-num)
(error 'sb-int:simple-program-error
- :format-control "invalid number of arguments: ~D"
- :format-arguments (list (length args))))
+ :format-control "invalid number of arguments: ~D (expected: >=~D)"
+ :format-arguments (list (length args) required-num)))
(when (>= i (the fixnum (+ required-num
optional-num)))
(go rest))
@@ -625,8 +625,8 @@
(unless keyp
(unless (or restp (= argi (length args)))
(error 'sb-int:simple-program-error
- :format-control "invalid number of arguments: ~D"
- :format-arguments (list (length args))))
+ :format-control "invalid number of arguments: ~D (expected: <=~D)"
+ :format-arguments (list (length args) (+ required-num optional-num))))
(go aux))
(unless (evenp restnum)
(error 'sb-int:simple-program-error