aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-10-10 02:20:11 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-10-10 02:20:11 -0300
commitb9ba263e5aaa151808df058f5babfed016a1879f (patch)
treee3827c9df8b99e55b4567f5b177a4814976d1d3c /actionview
parenta50cd3eb59a1696a2e525d03eea3c84aea95bdfc (diff)
downloadrails-b9ba263e5aaa151808df058f5babfed016a1879f.tar.gz
rails-b9ba263e5aaa151808df058f5babfed016a1879f.tar.bz2
rails-b9ba263e5aaa151808df058f5babfed016a1879f.zip
Removed deprecated `#original_exception` in `ActionView::Template::Error`.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/CHANGELOG.md4
-rw-r--r--actionview/lib/action_view/template/error.rb12
2 files changed, 5 insertions, 11 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index e93745c3bf..67bd9b5c8f 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -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
diff --git a/actionview/lib/action_view/template/error.rb b/actionview/lib/action_view/template/error.rb
index b95e5236a0..4010677477 100644
--- a/actionview/lib/action_view/template/error.rb
+++ b/actionview/lib/action_view/template/error.rb
@@ -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