-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imitate clojure.main Error Reporting #1004
Comments
My initial hunch is that we should make this scenario behave like Clojure 1.10.1 (putting more details into a temp edn file that is referenced when the exception summary is printed). |
mfikes
changed the title
Better error message for
Imitate clojure.main Error Reporting
Aug 17, 2019
Invalid arity: 1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was writing a small function to traverse a binary tree and due to an extra parentheses somewhere in the code I kept getting the following error:
Without any hint on the line or in the macro/function that the erroneous function call happened it was very hard to find the mistake. I eventually did find it after a few hours but it would be great if the error message was more descriptive and could include some more details.
Unfortunately, I don't have experience with the ClojureScript compile or internal implementation of the macros so I don't really know if there even exists any information during runtime that could be useful but I thought it would be great to expose it if there was.
The code throwing this error is below:
After saving the above into
repro.cljs
, running the code withplk repro.cljs
will generate the error.The problem is an extra pair of parentheses for the
:else
clause, so removing those fixes the problem and the code runs fine.Thanks a lot.
The text was updated successfully, but these errors were encountered: