Fork me on GitHub
#beginners
<
2024-04-30
>
Ruben Sevaldson10:04:51

Is it expected behavior that exceptions in threads are not logged anywhere? When I evaluate this in the REPL, there is no indication that an exception happened

(async/thread (throw (ex-info "hello" {})))
While this prints the exception with stack trace to the REPL
(async/go (throw (ex-info "hello" {})))

Ed10:04:57

Yes, this is the behaviour of JVM threads. You can add an exception handler for uncaught exceptions. See https://stuartsierra.com/2015/05/27/clojure-uncaught-exceptions

Ruben Sevaldson10:04:11

Nice, thanks 👍

👍 1
m3tti15:04:14

Is there anything like a blog entry that describes how the js runtime of clojure does the reload of function or how figwheel works.

john15:04:43

Search around for his others though

john15:04:11

It's not figwheel specific, but mostly the same principles

m3tti15:04:33

ah cool thanks

m3tti15:04:49

looks promising

john15:04:03

This one gives details about an early cljs compiler web service, but very illustrative of how things work, with diagrams: https://blog.fogus.me/2012/03/27/compiling-clojure-to-javascript-pt-3-the-himera-model/