Skip to content

Commit 4e9b619

Browse files
committed
CLJS-1110: cljs.closure/watch needs to print errors to *err*
1 parent 4ddd878 commit 4e9b619

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/clj/cljs/closure.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
[javax.xml.bind DatatypeConverter]
5858
[java.nio.file Path Paths Files StandardWatchEventKinds WatchKey
5959
WatchEvent FileVisitor FileVisitResult]
60-
[com.sun.nio.file SensitivityWatchEventModifier]))
60+
[com.sun.nio.file SensitivityWatchEventModifier]
61+
[com.google.common.base Throwables]))
6162

6263
(def name-chars (map char (concat (range 48 57) (range 65 90) (range 97 122))))
6364

@@ -1486,7 +1487,8 @@ should contain the source for the given namespace name."
14861487
(when-let [f (:watch-fn opts)]
14871488
(f))
14881489
(catch Throwable e
1489-
(.printStackTrace e))))
1490+
(binding [*out* *err*]
1491+
(println (Throwables/getStackTraceAsString e))))))
14901492
(watch-all [^Path root]
14911493
(Files/walkFileTree root
14921494
(reify

0 commit comments

Comments
 (0)