From 78d0e6d0598402a9384aff2b21a34a9a23c57240 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 4 Jul 2025 10:04:16 +0200 Subject: [PATCH] :sparkles: Add minor improvements to error report on calc bool content --- common/src/app/common/types/path.cljc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/types/path.cljc b/common/src/app/common/types/path.cljc index bcfa323c82..017a8df15d 100644 --- a/common/src/app/common/types/path.cljc +++ b/common/src/app/common/types/path.cljc @@ -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