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

Fix exception overwritten for parameters fetch method #20936

Merged
merged 1 commit into from
Jul 19, 2015

Conversation

repinel
Copy link
Member

@repinel repinel commented Jul 18, 2015

When executing an ActionController::Parameters#fetch with a block that raises a KeyError the raised KeyError will be rescued and converted to an ActionController::ParameterMissing exception, covering up the original exception.

Fixes #11695

/cc @senny @d-Pixie

When executing an `ActionController::Parameters#fetch` with a block
that raises a `KeyError` the raised `KeyError` will be rescued and
converted to an `ActionController::ParameterMissing` exception,
covering up the original exception.

[Jonas Schubert Erlandsson & Roque Pinel]
@repinel
Copy link
Member Author

repinel commented Jul 18, 2015

Some of the tests from #11695 didn't seem necessary, but if anyone really think it matters, I can add them in.

sgrif added a commit that referenced this pull request Jul 19, 2015
…rwritten

Fix exception overwritten for parameters fetch method
@sgrif sgrif merged commit e19acbb into rails:master Jul 19, 2015
@repinel repinel deleted the fix-params-fetch-exception-overwritten branch July 19, 2015 22:28
@d-Pixie
Copy link

d-Pixie commented Jul 27, 2015

@repinel Thanks <3 I never got all the tests to pass locally for my branch.

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.

None yet

3 participants