Permalink
Browse files

Merge pull request #12636 from kongregate/dont_rescue_Exceptions

Avoid unnecessary catching of Exception instead of StandardError (conver...
  • Loading branch information...
2 parents 24b690e + 54f4852 commit a53f7167061a2128ed256593845a456f4c717dfe @rafaelfranca rafaelfranca committed Oct 24, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionview/lib/action_view/template.rb
@@ -142,7 +142,7 @@ def render(view, locals, buffer=nil, &block)
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 @@ def #{method_name}(local_assigns, output_buffer)
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}"

0 comments on commit a53f716

Please sign in to comment.