diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-24 16:48:32 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-24 16:48:32 -0700 |
commit | a53f7167061a2128ed256593845a456f4c717dfe (patch) | |
tree | 133e1f176f8758c20b0f423059b88e880e80ba07 /actionview | |
parent | 24b690eae64e04c4f3566c52655e92d7a9521dca (diff) | |
parent | 54f485248ce2d097f1bf5e0cf202b22d13b26f78 (diff) | |
download | rails-a53f7167061a2128ed256593845a456f4c717dfe.tar.gz rails-a53f7167061a2128ed256593845a456f4c717dfe.tar.bz2 rails-a53f7167061a2128ed256593845a456f4c717dfe.zip |
Merge pull request #12636 from kongregate/dont_rescue_Exceptions
Avoid unnecessary catching of Exception instead of StandardError (conver...
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/template.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index e2c50fec47..9b0619f1aa 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -142,7 +142,7 @@ module ActionView compile!(view) view.send(method_name, locals, buffer, &block) end - rescue Exception => e + rescue => e handle_render_error(view, e) end @@ -294,7 +294,7 @@ module ActionView begin mod.module_eval(source, identifier, 0) ObjectSpace.define_finalizer(self, Finalizer[method_name, mod]) - rescue Exception => e # errors from template code + rescue => e # errors from template code if logger = (view && view.logger) logger.debug "ERROR: compiling #{method_name} RAISED #{e}" logger.debug "Function body: #{source}" |