1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
Rafael Mendonça França 2016-10-10 02:20:11 -03:00
parent a50cd3eb59
commit b9ba263e5a
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
2 changed files with 5 additions and 11 deletions

View file

@ -1,3 +1,7 @@
* 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

View file

@ -63,23 +63,13 @@ module ActionView
# 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