4 ms·
The main issue I have with Clojure is the stack trace ... If you've ever hate yourself when an error in Java popup and you have to trace 30 lines of stack trace
by NhanH 12y ago
The main issue I have with Clojure is the stack trace ... If you've ever hate yourself when an error in Java popup and you have to trace 30 lines of stack trace in Java, it's far worse in clojure.
- venantius 12y agoThis is a completely fair point, though there are tools to help minimize it and/or to make them easier to read. I'm hoping to release something at least partly ameliorating on the subject next month.
- MBlume 12y agoHave you looked at this and did it help at all? https://clojure.github.io/clojure/clojure.stacktrace-api.html https://clojure.github.io/clojure/clojure.stacktrace-api.htm...
- NhanH 12y agoclojure.stacktrace is nice for production debugging from time to time, but it's not solving the problem: by the time the code get to production, it normally has enough log (and is reasonably in good shape) that you can figure out what's wrong. It's the development part that's annoying, especially when you're playing around on the REPL - you're not catching all the error manually, so all you get is the normal stacktrace.
- deleted 12y ago[deleted]
- bmh100 12y agoI find there's a trick to reading stack traces that actually makes them not so bad. If you focus just on lines that reference your classes, there aren't that many lines to look at. From there, you can usually see the point at which the error occurred and ignore all of the lengthy Clojure runtime lines higher up.
- terhechte 12y agoTry this, makes exceptions in Clojure much more bearable: https://github.com/prismofeverything/schmetterling https://github.com/prismofeverything/schmetterling
- yogthos 12y agoThere's also Prone https://github.com/magnars/prone https://github.com/magnars/prone