Skip to content

Commit e9e1614

Browse files
anmonteirodnolen
authored andcommitted
CLJS-1633: Improve error associated with invalid foreign-libs :file path
1 parent 9cb8da1 commit e9e1614

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/main/clojure/cljs/closure.clj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,10 +1753,12 @@
17531753

17541754
(defn foreign-deps-str [opts sources]
17551755
(letfn [(to-js-str [ijs]
1756-
(let [url (or (and (#{:advanced :simple} (:optimizations opts))
1757-
(:url-min ijs))
1758-
(:url ijs))]
1759-
(slurp url)))]
1756+
(if-let [url (or (and (#{:advanced :simple} (:optimizations opts))
1757+
(:url-min ijs))
1758+
(:url ijs))]
1759+
(slurp url)
1760+
(throw (IllegalArgumentException.
1761+
(str "Foreign lib " ijs " does not exist")))))]
17601762
(str (string/join "\n" (map to-js-str sources)) "\n")))
17611763

17621764
(defn add-wrapper [{:keys [output-wrapper] :as opts} js]

0 commit comments

Comments
 (0)