I'm working on a fun interactive documentation system for an Om app. The idea
is that functions and components submit messages similar to doc strings to a
documentation channel that prints the manages printing the messages to the
console along with additional information. I'd love to include the line numbers
that the messages are submitted from.
In the past I've gotten printable stack traces in javascript by creating errors
and printing them (instead of throwing).
In cljs, if you
(defn stack-trace []
(throw)
with :optimization :none :source-maps true
in the js console you see (in chrome)
Uncaught null
my-function my-file.cljs:##
(anonymous function)
if you
(.log js/console (.-stack (js/Error.)))
you see
Error
at my-function (http://localhost:3000/js/out/ccs3/utils/helpers.js:140:66)
at http://localhost:3000/js/out/ccs3/utils/helpers.js:142:65 helpers.cljs:28
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.