Skip to content

Commit b9ba263

Browse files
committed
Removed deprecated #original_exception in ActionView::Template::Error.
1 parent a50cd3e commit b9ba263

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

‎actionview/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Removed deprecated `#original_exception` in `ActionView::Template::Error`.
2+
3+
*Rafael Mendonça França*
4+
15
* Render now accepts any keys for locals, including reserved words
26

37
Only locals with valid variable names get set directly. Others

‎actionview/lib/action_view/template/error.rb‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,13 @@ class Error < ActionViewError #:nodoc:
6363
# Override to prevent #cause resetting during re-raise.
6464
attr_reader :cause
6565

66-
def initialize(template, original_exception = nil)
67-
if original_exception
68-
ActiveSupport::Deprecation.warn("Passing #original_exception is deprecated and has no effect. " \
69-
"Exceptions will automatically capture the original exception.", caller)
70-
end
71-
66+
def initialize(template)
7267
super($!.message)
7368
set_backtrace($!.backtrace)
7469
@cause = $!
7570
@template, @sub_templates = template, nil
7671
end
7772

78-
def original_exception
79-
ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller)
80-
cause
81-
end
82-
8373
def file_name
8474
@template.identifier
8575
end

0 commit comments

Comments
 (0)