diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-09-29 16:22:42 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-09-29 16:38:13 -0700 |
commit | adf7f77e1a1ec4f1c6a94b362171b335525bb907 (patch) | |
tree | 8c78fe484d061f018b9d7cc9f0ce0d3d447149e6 /src/property.lisp | |
parent | 35028adc11107f035aa0c930d2f70a7dff2841be (diff) | |
download | consfigurator-adf7f77e1a1ec4f1c6a94b362171b335525bb907.tar.gz |
programmatic application of properties: error out if no *CONNECTION*
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property.lisp')
-rw-r--r-- | src/property.lisp | 7 |
1 files changed, 7 insertions, 0 deletions
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. |