X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fparse-defmacro-errors.lisp;h=456c35271db8fbd64a1c9b6013e4a511d129be56;hb=3bd7a97d1b11a2b0aee086ef211cae807f3dfc35;hp=271b668ed34c7180d8c41106b4fcb126622f7be7;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/code/parse-defmacro-errors.lisp b/src/code/parse-defmacro-errors.lisp index 271b668..456c352 100644 --- a/src/code/parse-defmacro-errors.lisp +++ b/src/code/parse-defmacro-errors.lisp @@ -17,10 +17,10 @@ ;;; We save space in macro definitions by calling this function. (defun do-arg-count-error (error-kind name arg lambda-list minimum maximum) - (multiple-value-bind (fname sb!debug:*stack-top-hint*) (find-caller-name) + (multiple-value-bind (fname sb!debug:*stack-top-hint*) + (find-caller-name-and-frame) (error 'defmacro-ll-arg-count-error :kind error-kind - :function-name fname :name name :argument arg :lambda-list lambda-list @@ -34,15 +34,10 @@ :initform nil))) (defun print-defmacro-ll-bind-error-intro (condition stream) - (if (null (defmacro-lambda-list-bind-error-name condition)) - (format stream - "error while parsing arguments to ~A in ~S:~%" - (defmacro-lambda-list-bind-error-kind condition) - (condition-function-name condition)) - (format stream - "error while parsing arguments to ~A ~S:~%" - (defmacro-lambda-list-bind-error-kind condition) - (defmacro-lambda-list-bind-error-name condition)))) + (format stream + "error while parsing arguments to ~A~@[ ~S~]:~%" + (defmacro-lambda-list-bind-error-kind condition) + (defmacro-lambda-list-bind-error-name condition))) (define-condition defmacro-bogus-sublist-error (defmacro-lambda-list-bind-error) @@ -93,14 +88,16 @@ (:report (lambda (condition stream) (print-defmacro-ll-bind-error-intro condition stream) (format stream + ;; FIXME: These should probably just be three + ;; subclasses of the base class, so that we don't + ;; need to maintain the set of tags both here and + ;; implicitly wherever this macro is used. (ecase (defmacro-ll-broken-key-list-error-problem condition) (:dotted-list "dotted keyword/value list: ~S") (:odd-length "odd number of elements in keyword/value list: ~S") - (:duplicate - "duplicate keyword: ~S") (:unknown-keyword "~{unknown keyword: ~S; expected one of ~{~S~^, ~}~}")) (defmacro-ll-broken-key-list-error-info condition)))))