Skip to content

Commit

Permalink
remove JS exception re-throw for init-fn calls
Browse files Browse the repository at this point in the history
JS doesn't like that and Firefox somehow omits the re-thrown
Error message and just shows a garbled exception trace.
  • Loading branch information
thheller committed May 2, 2024
1 parent 4260469 commit 9e01c3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/shadow/build/output.clj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
{:pre [(qualified-symbol? sym)]}
(if (= :release mode)
(str "\n" (comp/munge sym) "();")
(str "\ntry { " (comp/munge sym) "(); } catch (e) { console.error(\"An error occurred when calling (" sym ")\"); throw(e); }")))
(str "\ntry { " (comp/munge sym) "(); } catch (e) { console.error(\"An error occurred when calling (" sym ")\"); console.error(e); }")))

(defn- ns-list-string [coll]
(->> coll
Expand Down

0 comments on commit 9e01c3f

Please sign in to comment.