From 61d07ceecd36b2d11fbd93f2db3e472490794663 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 16 Apr 2021 20:31:06 -0700 Subject: include error when reporting INVALID-OR-AMBIGUOUS-PROPSPEC Signed-off-by: Sean Whitton --- src/propspec.lisp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/propspec.lisp') diff --git a/src/propspec.lisp b/src/propspec.lisp index 76f8e1b..7a12f19 100644 --- a/src/propspec.lisp +++ b/src/propspec.lisp @@ -23,7 +23,8 @@ (define-condition ambiguous-propspec (undefined-function) ()) (define-condition invalid-or-ambiguous-propspec (error) - ((broken-propspec :initarg :propspec :reader broken-propspec)) + ((original-error :initarg :error :reader original-error) + (broken-propspec :initarg :propspec :reader broken-propspec)) (:report (lambda (condition stream) (format @@ -35,8 +36,10 @@ properties whose definitions have not been loaded. Ensure that all functions, properties and property combinators used in a propspec are defined before that propspec is processed by Consfigurator. -~S" - (broken-propspec condition))))) +~S" (broken-propspec condition)) + (when (slot-boundp condition 'original-error) + (format stream "~&~%The error from the code walker was:~%~%~A" + (original-error condition)))))) (defvar *replaced-propapps* nil "Internal dynamic variable used in MAP-PROPSPEC-PROPAPPS.") @@ -107,8 +110,9 @@ arguments to properties in propapps, but that should not be needed." (let ((expanded (handler-case (macrolet-and-expand *known-property-macrolets* propspec) - (error () - (error 'invalid-or-ambiguous-propspec :propspec propspec))))) + (error (condition) + (error 'invalid-or-ambiguous-propspec :error condition + :propspec propspec))))) ;; Now we use a dummy macro expansion pass to find any symbols without ;; function or property definitions occurring in function call ;; positions. These could potentially be properties whose definitions -- cgit v1.2.3