Move catching of liquid errors in include tags
The previous code only caught render-time errors. This change makes it catch parse-time errors as well, such as unknown tags.
This commit is contained in:
parent
7d56426d50
commit
809ab5e355
|
@ -95,12 +95,10 @@ eos
|
|||
|
||||
context.stack do
|
||||
context['include'] = parse_params(context) if @params
|
||||
begin
|
||||
partial.render!(context)
|
||||
rescue => e
|
||||
raise IncludeTagError.new e.message, File.join(INCLUDES_DIR, @file)
|
||||
end
|
||||
partial.render!(context)
|
||||
end
|
||||
rescue => e
|
||||
raise IncludeTagError.new e.message, File.join(INCLUDES_DIR, @file)
|
||||
end
|
||||
|
||||
def validate_dir(dir, safe)
|
||||
|
|
Loading…
Reference in New Issue