aboutsummaryrefslogtreecommitdiff
path: root/src/property.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-21 16:55:04 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-21 17:22:25 -0700
commit3822229ee9b5e9e4b582e7be43c37832bb0dbfa5 (patch)
tree2030eba5076cf166f1695dda3329819d89481b0b /src/property.lisp
parentfea0ade9e5414cb2e3ab1d758fbecb27cf0e38b1 (diff)
downloadconsfigurator-3822229ee9b5e9e4b582e7be43c37832bb0dbfa5.tar.gz
resignal as FAILED-CHANGE only errors we expect we might see
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property.lisp')
-rw-r--r--src/property.lisp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/property.lisp b/src/property.lisp
index 309070f..ccb1813 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -85,18 +85,13 @@
(defun propappcheck (propapp)
(apply #'propcheck propapp))
-(defmacro with-error-is-failed-change (&body forms)
+(defmacro with-some-errors-are-failed-change (&body forms)
`(handler-case (progn ,@forms)
- (failed-change (c)
- ;; resignal
- (apply #'failed-change
- (simple-condition-format-control c)
- (simple-condition-format-arguments c)))
- (error (c)
- (failed-change "~&Attempt to (un)apply property failed:~%~A" c))))
+ (run-failed (c)
+ (failed-change "~&Unhandled failed command: ~%~A" c))))
(defun propapply (prop &rest args)
- (with-error-is-failed-change
+ (with-some-errors-are-failed-change
(let ((check (get prop 'check)))
(if (and check (apply check args))
:no-change
@@ -106,7 +101,7 @@
(apply #'propapply propapp))
(defun propunapply (prop &rest args)
- (with-error-is-failed-change
+ (with-some-errors-are-failed-change
(let ((check (get prop 'check)))
(if (and check (not (apply check args)))
:no-change