rails/strong_parameters — pull request #156 by d-Pixie (2013-07-08 06:50:15+00:00)
Title: Params.fetch covers up any KeyError raised in block.

## What?
Given:

params = ActionController::Parameters.new()
params.fetch(:missing_key) { some.default_action( :that_raises, KeyError ) }

I would expect to see the `KeyError` from the block, not a `ActionController::ParameterMissing` exception for `:missing_key`.

## Why?
To ease in debugging one should not cover relevant exceptions. In this case the error is not that the requested key is missing and therefore the presented error message is a lie :)

## Fix
Not implemented yet, I wanted to get some comments __before__ coding this time. I'd guess we'd have to fix the rescue line in action_controller/parameters.rb line 83. Suggestions on how are welcome.

If this is something we want just let me know and I'll fix it.