refactor(loader): Throw when template not found
This commit is contained in:
@@ -27,10 +27,7 @@ class IncludeNode : NodeType {
|
||||
throw TemplateSyntaxError("'\(self.templateName)' could not be resolved as a string")
|
||||
}
|
||||
|
||||
guard let template = try loader.loadTemplate(name: templateName) else {
|
||||
throw TemplateSyntaxError("'\(templateName)' template not found")
|
||||
}
|
||||
|
||||
let template = try loader.loadTemplate(name: templateName)
|
||||
return try template.render(context)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user