Add minor improvements to error report on calc bool content

This commit is contained in:
Andrey Antukh 2025-07-04 10:04:16 +02:00
parent 6d41d36b3a
commit 78d0e6d059
1 changed files with 11 additions and 1 deletions

View File

@ -200,7 +200,17 @@
contents
(sequence extract-content-xf (:shapes shape))]
(bool/calculate-content (:bool-type shape) contents)))
(ex/try!
(bool/calculate-content (:bool-type shape) contents)
:on-exception
(fn [cause]
(ex/raise :type :internal
:code :invalid-path-content
:hint (str "unable to calculate bool content for shape " (:id shape))
:shapes (:shapes shape)
:content (mapv str contents)
:cause cause)))))
(defn calc-bool-content
"Calculate the boolean content from shape and objects. Returns a