Permalink
Browse files

Avoid unnecessary catching of Exception instead of StandardError (con…

…verting Exceptions into StandardErrors)
  • Loading branch information...
stopdropandrew committed Oct 24, 2013
1 parent 3e5bb86 commit 54f485248ce2d097f1bf5e0cf202b22d13b26f78
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 54f4852

Please sign in to comment.