On Mar 6, 5:14 pm, Mark Volkmann <r.mark.volkm...@gmail.com> wrote:
> What's the recommended way to use this library in code that is run
> outside a REPL to simplify stack traces so they focus on Clojure code
> instead of Java code?

Hi Mark,

I wrote that library so I could use it in test-is, so I'm not sure if
it will help you there.  One thing it explicitly doesn't try to do is
omit non-Clojure-related stack frames from the stack trace.  It just
rewrites Clojure-related frames so that they look more like Clojure
code.

> (try
>   (main)
>   (catch Exception e (print-stack-trace e 5)))

In your example, you probably want "print-cause-trace" instead of
"print-stack-trace".  You probably also need a number much higher than
5 to get useful information.

Someone else put a more elaborate stack trace library on github, you
could search the list for it.

-Stuart Sierra

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to