Skip to content

Instantly share code, notes, and snippets.

@austinhaas
Created February 28, 2014 20:32
Show Gist options
  • Save austinhaas/9279237 to your computer and use it in GitHub Desktop.
Save austinhaas/9279237 to your computer and use it in GitHub Desktop.
How to catch errors and display a stacktrace from within a core.async thread.
(let [out *out*]
(thread
(binding [*out* out
*err* out]
(try
(your-code-here)
(catch Throwable e (clojure.repl/pst e))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment