Skip to content
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

register-local ignoring caught exceptions and returning a symbol causes problems #29

Open
TimoFreiberg opened this issue Jul 21, 2018 · 0 comments

Comments

@TimoFreiberg
Copy link

Hello :)

register-local returns ::analyze-failure, if creating the localBinding threw an Exception: https://github.com/ztellman/riddley/blob/master/src/riddley/compiler.clj#L67

I encountered an issue using cloverage (cloverage/cloverage#208) where the user-facing exception was a ClassCastException in the Clojure compiler (https://github.com/clojure/clojure/blob/4ff462372c29ff2bc22b4d39962ad526f7e2c73d/src/jvm/clojure/lang/Compiler.java#L7289).

So this was relatively hard to debug - I only found out that the value returned by RT.get(LOCAL_ENV.deref(), sym) was :riddley.compiler/analyze-failure by adding more error messages in the Clojure compiler...

The ignored exception in register-local was a java.lang.RuntimeException: Method code too large!, this would have been valuable information.

Do you have any ideas how to improve this?
I assume there are use cases where the exception really should be ignored, but I think cloverage would want the exception to be thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant