Removed deprecated `#original_exception` in `ActionView::Template::Error`.

上级 a50cd3eb
* Removed deprecated `#original_exception` in `ActionView::Template::Error`.
*Rafael Mendonça França*
* Render now accepts any keys for locals, including reserved words
Only locals with valid variable names get set directly. Others
......
......@@ -63,23 +63,13 @@ class Error < ActionViewError #:nodoc:
# Override to prevent #cause resetting during re-raise.
attr_reader :cause
def initialize(template, original_exception = nil)
if original_exception
ActiveSupport::Deprecation.warn("Passing #original_exception is deprecated and has no effect. " \
"Exceptions will automatically capture the original exception.", caller)
end
def initialize(template)
super($!.message)
set_backtrace($!.backtrace)
@cause = $!
@template, @sub_templates = template, nil
end
def original_exception
ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller)
cause
end
def file_name
@template.identifier
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册