[CLJ-1155] Suppress tracebacks from clojure.core Created: 01/Feb/13 Updated: 29/Mar/13 Resolved: 29/Mar/13
It would be really nice if we could hide the Java traceback from the compiler when it's not relevant. When there's no Java interop, it's not useful. I can't see any case where we want the tracebacks from the compiler referencing clojure.core.
Here's how a syntax error traceback looks at the moment on trunk:
With my patch, this is simplified to:
Another example: here's how name errors appear on trunk:
I'm not familiar with the compiler internals, but I've attached a tentative patch. Undoubtedly it isn't perfect. For one, it would be nicer to say 'Syntax error' rather than 'java.lang.RuntimeException'. All the tests pass with this change.
Relevant mailing list discussion: https://groups.google.com/forum/?fromgroups=#!searchin/clojure/wilfred/clojure/M5NlEW7HJ_c/joUY6mo6Rd8J
Please let me know what you think. This would make my life easier when developing.
|Comment by Stuart Halloway [ 29/Mar/13 6:06 AM ]|
It is easy for tools that consume Clojure to hide stack traces for those who do not want to see them. If Clojure itself eats stack traces, it is impossible for those of us who do want to see them to get them back.
Please do this kind of work in tool (if at all) and make it optional for users.