Skip to content

Instantly share code, notes, and snippets.

@logosity
Created March 22, 2012 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logosity/2159017 to your computer and use it in GitHub Desktop.
Save logosity/2159017 to your computer and use it in GitHub Desktop.
print out current stack in clojure
;;; print out the stack at the point of invocation of the macro (and continue execution)
;;;
(defmacro print-stack []
`(doseq [s# (.getStackTrace (Thread/currentThread))]
(println s#)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment