From 06fb31544f2ba67369191565e1373b1df2b2781b Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Sat, 7 Sep 2013 20:15:34 +0200 Subject: [PATCH] Change error handling for gist tag: raise exception --- lib/jekyll/tags/gist.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/tags/gist.rb b/lib/jekyll/tags/gist.rb index d69499af..145a41b4 100644 --- a/lib/jekyll/tags/gist.rb +++ b/lib/jekyll/tags/gist.rb @@ -12,7 +12,15 @@ module Jekyll gist_id, filename = tag_contents[0], tag_contents[1] gist_script_tag(gist_id, filename) else - "Error parsing gist id" + raise SyntaxError.new <<-eos +Syntax error in tag 'gist' while parsing the following markup: + + #{@markup} + +Valid syntax: + for public gists: {% gist 1234567 %} + for private gists: {% gist user/1234567 %} +eos end end