aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template
diff options
context:
space:
mode:
authorJohn Firebaugh <john_firebaugh@bigfix.com>2010-09-24 18:42:01 -0700
committerJohn Firebaugh <john_firebaugh@us.ibm.com>2010-10-29 15:27:19 -0700
commit403b06e98ee88b96b6fbd8692f072fdfa7857639 (patch)
treee3051cd94855c2dd32865ddaaf7b1e0326aca891 /actionpack/lib/action_view/template
parent7bbad753e2545a530394f2fe73b7edfef1523ab0 (diff)
downloadrails-403b06e98ee88b96b6fbd8692f072fdfa7857639.tar.gz
rails-403b06e98ee88b96b6fbd8692f072fdfa7857639.tar.bz2
rails-403b06e98ee88b96b6fbd8692f072fdfa7857639.zip
Ensure original exception message is present in both Template::Error#message and Template::Error#inspect.
Previously, #inspect would produce #<ActionView::Template::Error: ActionView::Template::Error>, which is not very useful.
Diffstat (limited to 'actionpack/lib/action_view/template')
-rw-r--r--actionpack/lib/action_view/template/error.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/template/error.rb b/actionpack/lib/action_view/template/error.rb
index 3c7380ee19..c3d5aca6ac 100644
--- a/actionpack/lib/action_view/template/error.rb
+++ b/actionpack/lib/action_view/template/error.rb
@@ -52,6 +52,7 @@ module ActionView
attr_reader :original_exception, :backtrace
def initialize(template, assigns, original_exception)
+ super(original_exception.message)
@template, @assigns, @original_exception = template, assigns.dup, original_exception
@sub_templates = nil
@backtrace = original_exception.backtrace
@@ -61,10 +62,6 @@ module ActionView
@template.identifier
end
- def message
- original_exception.message
- end
-
def sub_template_message
if @sub_templates
"Trace of template inclusion: " +