From 809ab5e3556c0d3a9c7da47d83ac3186ff2cfba0 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Thu, 3 Oct 2013 23:56:58 +0200 Subject: [PATCH] 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. --- lib/jekyll/tags/include.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index c8a21c2b..50092c2b 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -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)