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

improved try-either function #165

Merged
3 commits merged into from
Mar 30, 2016
Merged

improved try-either function #165

3 commits merged into from
Mar 30, 2016

Conversation

shmish111
Copy link

previously it would only take a single form as the body, now it returns the last item in the body as a right, as is normal

previously it would only take a single form as the body
now it returns the last item in the body as a right, as is normal
@shmish111
Copy link
Author

I can't understand what conflicts this branch has, I have updated latest upstream locally with no conflicts :(

@ghost
Copy link

ghost commented Mar 18, 2016

We can use do instead.

(defmacro try-either [body]
  `(try (right (do ~@body)) (catch Exception e# (left e#)))

@ghost
Copy link

ghost commented Mar 21, 2016

It seems there are still some merge conflicts, I can't merge this from the web interface.

@shmish111
Copy link
Author

Fixed merge issue. Also, sorry about not spotting the need to separate js and java errors, I'm new to cljc so this stuff escaped my thought process.

@shmish111
Copy link
Author

@dialelo this doesn't appear to be my PR that is breaking the tests...

@yurrriq
Copy link
Collaborator

yurrriq commented Mar 22, 2016

@shmish111: Agreed. See #160.

@ghost
Copy link

ghost commented Mar 30, 2016

Thanks a lot for your time and sorry for my delay.

@ghost ghost merged commit 69c8da3 into funcool:master Mar 30, 2016
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants