Add better error messaging for #1541
This commit is contained in:
parent
3cbe2acaf7
commit
e09f7fadb5
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue