提交 a53f7167 编写于 作者: R Rafael Mendonça França

Merge pull request #12636 from kongregate/dont_rescue_Exceptions

Avoid unnecessary catching of Exception instead of StandardError (conver...
......@@ -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}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册