From ec85c49de38641df094ddbef1e7a4749e63864a6 Mon Sep 17 00:00:00 2001 From: Anatol Broder Date: Tue, 17 Sep 2013 22:11:56 +0200 Subject: [PATCH] Change exception type --- lib/jekyll/tags/include.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index f02f6310..2b0d82b4 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -41,7 +41,7 @@ module Jekyll def validate_file_name if @file !~ /^[a-zA-Z0-9_\/\.-]+$/ || @file =~ /\.\// || @file =~ /\/\./ - raise SyntaxError.new <<-eos + raise ArgumentError.new <<-eos Invalid syntax for include tag. File contains invalid characters or sequences: #{@file} @@ -57,7 +57,7 @@ eos def validate_params full_valid_syntax = Regexp.compile('\A\s*(?:' + VALID_SYNTAX.to_s + '(?=\s|\z)\s*)*\z') unless @params =~ full_valid_syntax - raise SyntaxError.new <<-eos + raise ArgumentError.new <<-eos Invalid syntax for include tag: #{@params}