On May 13, 6:11 am, Brian Watkins <wildu...@gmail.com> wrote:
> What is the method that gets line numbers and function names into
> stack traces?  I know I can't get them in the Repl (because there
> aren't any), but I tried loading my file with load-file and that
> doesn't help either.

It's there; Clojure binds the last Exception to *e

http://tech.puredanger.com/2010/02/17/clojure-stack-trace-repl/

user=> (use 'clojure.stacktrace)
nil
user=> (/ 5 0)
java.lang.ArithmeticException: Divide by zero (NO_SOURCE_FILE:0)
user=> (print-stack-trace *e)
clojure.lang.Compiler$CompilerException:
java.lang.ArithmeticException: Divide by zero (NO_SOURCE_FILE:0)
 at clojure.lang.Compiler.eval (Compiler.java:5365)
    clojure.lang.Compiler.eval (Compiler.java:5317)
    clojure.core/eval (core.clj:2132)
...

I use vimclojure and in its repl embedded inside vim all I have to do
is ,st or ,ct

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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