Răsfoiți Sursa

enhance: display error stack when it's caught by UI

Tienson Qin 1 an în urmă
părinte
comite
a47db0c813
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      src/main/frontend/ui.cljs

+ 3 - 2
src/main/frontend/ui.cljs

@@ -693,8 +693,9 @@
      (fn [state error _info]
        (log/error :exception error)
        (notification/show!
-        (str "Error caught by UI!\n " error)
-        :error)
+        [:div.flex.flex-col.gap-2
+         [:div (str "Error caught by UI!\n " error)]
+         (str (.-stack error))] `:error)
        (assoc state ::error error))}
   [{error ::error, c :rum/react-component} error-view view]
   (if (some? error)