From 3eb25694652d2fb8e73240327e65a43f76fac400 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 1 Aug 2023 17:40:23 +0200 Subject: [PATCH] :sparkles: Add better exception reporting on commit-changes --- frontend/src/app/main/data/workspace/changes.cljs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/changes.cljs b/frontend/src/app/main/data/workspace/changes.cljs index 166538860..ceaef9e4b 100644 --- a/frontend/src/app/main/data/workspace/changes.cljs +++ b/frontend/src/app/main/data/workspace/changes.cljs @@ -8,6 +8,7 @@ (:require [app.common.data :as d] [app.common.data.macros :as dm] + [app.common.exceptions :as ex] [app.common.logging :as log] [app.common.pages :as cp] [app.common.pages.changes :as cpc] @@ -205,6 +206,7 @@ path (if (= file-id current-file-id) [:workspace-data] [:workspace-libraries file-id :data])] + (try (dm/assert! "expect valid vector of changes" @@ -217,7 +219,11 @@ (ctst/update-object-indices page-id)))) (catch :default err - (log/error :js/error err) + (when-let [data (ex-data err)] + (js/console.log (ex/explain data))) + + (when (ex/error? err) + (js/console.log (.-stack ^js err))) (vreset! error err) state))))