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

run! function that raises error #143

Open
norpan opened this issue Oct 9, 2017 · 2 comments
Open

run! function that raises error #143

norpan opened this issue Oct 9, 2017 · 2 comments

Comments

@norpan
Copy link
Contributor

norpan commented Oct 9, 2017

How about having a additional run! function that raises an error instead of returning {:error, ...}?
This seems to be the canonical elixir way to do things and would make it easier to write code and not have to pattern match :ok on each call.

@queer
Copy link

queer commented Jan 5, 2018

This might not be the solution you want (and this is an amazingly-late response), but you could write a bangify function (used like this).

@norpan
Copy link
Contributor Author

norpan commented Jan 19, 2018

Indeed one could write such a function, but Elixir itself has different versions of functions so it makes sense to supply these in this library as well. Otherwise every user has to research and implement these themselves.

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

2 participants