Avoid unnecessary catching of Exception instead of StandardError (converting Exceptions into StandardErrors)
This commit is contained in:
parent
3e5bb8693a
commit
54f485248c
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue