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

Refactor catch error functions #15

Open
ondrej-tucek opened this issue Oct 16, 2021 · 0 comments
Open

Refactor catch error functions #15

ondrej-tucek opened this issue Oct 16, 2021 · 0 comments

Comments

@ondrej-tucek
Copy link
Contributor

Examples of use:

iex> e = {:error, :bad}
iex> Result.catch_error(e, fn :bad -> {:ok, 123} end)
{:ok, 123}
iex> Result.catch_error(e, fn :wrong -> {:ok, 345} end)
{:error, :bad}
iex> Result.catch_error({:ok, 987}, fn :bad -> {:ok, 123} end)
{:ok, 987}
@ondrej-tucek ondrej-tucek self-assigned this Oct 16, 2021
@ondrej-tucek ondrej-tucek changed the title Refactor catch error funcitons WIP: Refactor catch error functions Oct 16, 2021
@s-m-i-t-a s-m-i-t-a assigned s-m-i-t-a and unassigned ondrej-tucek Sep 13, 2022
@s-m-i-t-a s-m-i-t-a changed the title WIP: Refactor catch error functions Refactor catch error functions Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants