From 4b9e67c5b9d9f751d633c787d24a1491f3ef498e Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Thu, 24 May 2007 16:42:10 +0000 Subject: catch possible WSOD when trying to render a missing partial. Closes #8454 [Catfish] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/base.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 69db2772bb..f6885fa292 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -278,6 +278,10 @@ module ActionView #:nodoc: template_source = nil # Don't read the source until we know that it is required + if template_file_name.blank? + raise ActionViewError, "Couldn't find template file for #{template_path} in #{@view_paths.inspect}" + end + begin render_template(template_extension, template_source, template_file_name, local_assigns) rescue Exception => e -- cgit v1.2.3