3 ms·
Clojure's stack trace _is_ Java's strack trace. Because of this it's not as big of a problem as one would think. For real debugging you would attach a debugger
by swannodette 17y ago
Clojure's stack trace _is_ Java's strack trace.
Because of this it's not as big of a problem as one would think. For real debugging you would attach a debugger, jdb to Emacs, jSwat to any REPL, or the one built into Netbeans (if you're using the Enclojure plugin). These already work well, will only continue to improve, and others will emerge.
- dreish 17y agoThat fact, however, doesn't mean there isn't room for future improvement in exception reporting at the REPL. Once the REPL catches an exception, it can do pretty much anything with it, since java.lang.Throwable objects provide convenient methods for a program to examine the stack trace. It's just a matter of someone writing a function that scratches whatever their itch is. I found that after a while I just got used to reading them, but I'm certain the initially ugly exceptions do turn off some people who don't start out with a strong enough desire to use Clojure.
- amix 17y agoIt's Java's stack trace alright, but the stack traces are not that useful since they mostly relate to tons of internal Clojure related stuff - - than the written code. Like the blog author notes: "Stack traces in Clojure will often tell you little to nothing about what is causing the error, or more importantly, where it's coming from in your code." - - The most important property of a stack trace is to tell you where the bug is coming from in your own code - - and this is a non trivial task if you compile down to a low-level language.