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

Use throw and catch rather than raise and rescue to handle context failure #126

Open
laserlemon opened this issue Mar 24, 2017 · 2 comments

Comments

@laserlemon
Copy link
Collaborator

No description provided.

@laserlemon laserlemon changed the title Use throw and catch rather than raise and rescue to handle context failure Use throw and catch rather than raise and rescue to handle context failure Mar 24, 2017
@laserlemon
Copy link
Collaborator Author

@hedgesky

@mike-shock
Copy link

mike-shock commented Nov 14, 2019

This code
begin
p AuthenticateUser.call({email: "[email protected]", password: "short"})
rescue # Interactor::Failure
p "Authentication failed!"
end

doesn't react to the context.fail! statement.
Also it's said in the README that "context.fail! always throws an exception of type Interactor::Failure."

taylorthurlow pushed a commit to taylorthurlow/interactor that referenced this issue Jul 12, 2020
taylorthurlow pushed a commit to taylorthurlow/interactor that referenced this issue Jul 12, 2020
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