venantius / ultra

A Leiningen plugin for a superior development environment
Eclipse Public License 1.0
1.24k stars 35 forks source link

stacktraces are empty #5

Closed tcrayford closed 9 years ago

tcrayford commented 9 years ago

if I go to a new repl and try out expressions that throw exceptions, stacktraces come out empty:

http://cl.ly/image/081V1o3X2b11

venantius commented 9 years ago

Hmm, I thought I had fixed this a while back. I'll take a closer look at this tonight.

rafadc commented 9 years ago

As a workaround you can do

(pst)

after the stacktrace and it will be shown in the nice ultra format.

tcrayford commented 9 years ago

@venantius : did you look at this yet?

tcrayford commented 9 years ago

btw, I checked, and clojure.repl/pst is definitely bound to aviso's pretty print:

clojure.repl/pst
#<io.aviso.repl$pretty_pst@20bf2e8 io.aviso.repl$pretty_pst@20bf2e8>

and even calling (clojure.repl/pst (ex-info "" {})) gives a stacktrace, so this is really quite odd.

tcrayford commented 9 years ago

@venantius : if you have any pointers, I'm happy going and looking

venantius commented 9 years ago

Yeah, sorry, haven't had a chance to check it out, but haven't forgotten. Busy week.

If you want to go digging, I'm sure the answer is in the disparity between ultra.repl and ultra.stacktrace; shouldn't be hard to toy with it a bit and achieve the desired behavior.

tcrayford commented 9 years ago

yeah, got it, the docs for io.aviso.repl/pretty-repl-caught:

  "A replacement for `clojure.main/repl-caught` that prints the exception to `*err*`, without a stack trace or properties."

Think we just need to swap that out to be pretty-pst as per the comment in ultra.repl