diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-16 20:31:06 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-16 20:35:39 -0700 |
commit | 61d07ceecd36b2d11fbd93f2db3e472490794663 (patch) | |
tree | d46cf1b86eacb1e5104975267f80dce41c0c5a81 /src/propspec.lisp | |
parent | 006b067b994746e8672e66dfe49721cedd484191 (diff) | |
download | consfigurator-61d07ceecd36b2d11fbd93f2db3e472490794663.tar.gz |
include error when reporting INVALID-OR-AMBIGUOUS-PROPSPEC
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/propspec.lisp')
-rw-r--r-- | src/propspec.lisp | 14 |
1 files changed, 9 insertions, 5 deletions
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 |