Skip to content

Commit fc827fa

Browse files
Deraendnolen
authored andcommitted
CLJS-1647: Rethrow exception from parallel-build
Build tooling should be able to catch the exception so that they can choose how to show the error the user.
1 parent deec44a commit fc827fa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,7 @@
824824
{:output-file (comp/rename-to-js
825825
(util/ns->relpath (:ns ns-info)))})))
826826
(catch Throwable e
827-
(util/debug-prn e)
828-
(reset! failed true)))
827+
(reset! failed e)))
829828
(when-not @failed
830829
(when-let [ns (:ns ns-info)]
831830
(swap! input-set disj ns))
@@ -849,6 +848,8 @@
849848
(.countDown latch))))
850849
(util/measure compiler-stats "Compile sources" (.await latch))
851850
(.shutdown es)
851+
(when @failed
852+
(throw @failed))
852853
@compiled))
853854

854855
(defn compile-sources

0 commit comments

Comments
 (0)