Add better error messaging for #1541

v3-stable
Thomas Reynolds 2015-06-15 09:58:29 -07:00
parent 3cbe2acaf7
commit e09f7fadb5
1 changed files with 4 additions and 0 deletions

View File

@ -428,6 +428,10 @@ module Middleman
layout_path = locate_layout(layout_name, current_engine)
if !layout_path
raise ::Middleman::CoreExtensions::Rendering::TemplateNotFound, "Could not locate layout: #{layout_name}"
end
extension = File.extname(layout_path)
engine = extension[1..-1].to_sym