Merge pull request #6847 from penpot/niwinz-staging-error-reports-2

 Add minor improvements to error report on calc bool content
This commit is contained in:
Alejandro Alonso 2025-07-04 10:53:02 +02:00 committed by GitHub
commit 264aef277d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,7 +200,17 @@
contents contents
(sequence extract-content-xf (:shapes shape))] (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 (defn calc-bool-content
"Calculate the boolean content from shape and objects. Returns a "Calculate the boolean content from shape and objects. Returns a