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

try...catch can't recur a loop #522

Open
brycecovert opened this issue Sep 30, 2016 · 0 comments
Open

try...catch can't recur a loop #522

brycecovert opened this issue Sep 30, 2016 · 0 comments

Comments

@brycecovert
Copy link

I ran into a situation like this whilst playing around with pixie magic:

(loop [x 1]
  (try
    (recur (inc x))
    (catch ex (println ex))))


RuntimeException: :pixie.stdlib/AssertionException Recur must have same number of forms as matching loop

This lead me to discover that the cause was that try wraps the body in a function, telling the vm to invoke it. Perhaps this is just an implicit limitation, in which case, maybe there's a way to give a better error message, or perhaps there is a way to, instead of wrapping it in a function, evaluate the forms themselves.

I'm happy to work on this, but would need some direction. Thanks!

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