From adf7f77e1a1ec4f1c6a94b362171b335525bb907 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 29 Sep 2021 16:22:42 -0700 Subject: programmatic application of properties: error out if no *CONNECTION* Signed-off-by: Sean Whitton --- src/property.lisp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/property.lisp b/src/property.lisp index e846c46..b43fe8c 100644 --- a/src/property.lisp +++ b/src/property.lisp @@ -300,6 +300,13 @@ parsing FORMSV and pushing SETPROP keyword argument pairs to plist SLOTSV." ,@(and (getf ,slotsv :apply) `((defun-with-args ,,namev args ,,lambdav + (unless *connection* + (simple-program-error +"Attempt to programmatically apply property with no connection established. + +Common causes of this error are (i) missing the '.' to enable the dotted +propapp rules; and (ii) inadvertently calling the contents of a property's +function cell, instead of constructing a propapp, within DEFPROPSPEC.")) ;; Properties with :HOSTATTRS subroutines which set ;; new hostattrs should not be used programmatically ;; in this way, so issue a warning. -- cgit v1.2.3