From 403b06e98ee88b96b6fbd8692f072fdfa7857639 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 24 Sep 2010 18:42:01 -0700 Subject: Ensure original exception message is present in both Template::Error#message and Template::Error#inspect. Previously, #inspect would produce #, which is not very useful. --- actionpack/lib/action_view/template/error.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/template') 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: " + -- cgit v1.2.3