4 ms·
The Clojure Error Message Catalog: common error messages and their meanings
- defenestration 10y agoWhen I was learning Clojure a year ago, I spent quite some time Googling the cryptic error messages. An overview like this would have been useful. But I never really understood why Clojure couldn't give better error-messages by itself.
- StreamBright 10y agoYes, I think error messages are the weakest point of Clojure. The rest is pretty good though. :)
- defenestration 10y agoI don't use Clojure regularly now, but learning functional programming with it was great. Tip for starting clojurians: try solving the interactive problems at 4clojure.com.
- kimi 10y agoAgreed. But having one place to check before reaching for StackOverflow is nice. The other thing that I find interesting is that when I'm hitting into an error I want it to go away ASAP. But if I read a collected list, an error I don't understand immediately gets my attention. So I think it's an nice way to learn something.
- JamesLeonis 10y agoThey are working on this right now. There's tons of work done to integrate core.spec into the core functions so they spit out legible error messages instead of raw stack traces and exceptions.
- throwaway7645 10y agoAny chance this or something else could make it into core so that the user doesn't have to go through hoops? Having to add a library to get that is just very...perl lol.
- nickik 10y agoWith clojure 1.9 clojure.spec will be available and core libraries should be updated. This should make error messages much better. This library however could be a useful edition when you encounter the lower level errors.
- jgalt212 10y agoright b/c you can't clojure.spec everything.
- preek 10y agoBecause some of Clojure Core is written in Java or is there another reason that I'm missing?
- didibus 10y agoSome things in Clojure are so dynamic, that it's still an open research problem as to how you can properly assign types to them.
- jgalt212 10y agobecause clojure.spec, in practice, only governs interaces. It's not going to help you with bugs that are as a result of data structures generated and manipulated inside of a function.
- harperlee 10y agoIs there any date on when 1.9 will be released? I searched a little bit for the date but couldn't find anything concrete (I know I can access lambdas and that there is a spec "antishim"[1] for 1.8 - I'm just curious). [1] https://github.com/tonsky/clojure-future-spec https://github.com/tonsky/clojure-future-spec
- JamesLeonis 10y agoThere is no release date as of yet [1]. But in that thread Sean Cornfield: > Obligatory: “we’ve been running the 1.9 Alphas in production for months so that we can leverage clojure.spec” – no problems so far. [1]: https://groups.google.com/forum/#!topic/clojure/i7ipoze2jos https://groups.google.com/forum/#!topic/clojure/i7ipoze2jos
- jgalt212 10y agoI have not use this package, but looks to be pretty helpful with figuring out stack traces. https://github.com/mmcgrana/clj-stacktrace https://github.com/mmcgrana/clj-stacktrace