Avoid unnecessary catching of Exception instead of StandardError (converting Exceptions into StandardErrors)

This commit is contained in:
stopdropandrew 2013-10-24 16:09:58 -07:00
parent 3e5bb8693a
commit 54f485248c
1 changed files with 2 additions and 2 deletions

View File

@ -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}"