From 4cfbdb07bb50aa4a8375a7d20b49beac55d66ecf Mon Sep 17 00:00:00 2001 From: Alfred Xing Date: Sat, 2 Aug 2014 11:51:04 -0700 Subject: [PATCH] Show input in error message Show date input in error message to make it easier for user to find infringing date/file --- lib/jekyll/utils.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/utils.rb b/lib/jekyll/utils.rb index fe8eb79c..dc190297 100644 --- a/lib/jekyll/utils.rb +++ b/lib/jekyll/utils.rb @@ -89,10 +89,10 @@ module Jekyll # # Returns the parsed date if successful, throws a FatalException # if not - def parse_date(input, msg = "Invalid date: could not be parsed.") + def parse_date(input, msg = "Input could not be parsed.") Time.parse(input) rescue ArgumentError - raise Errors::FatalException.new(msg) + raise Errors::FatalException.new("Invalid date '#{input}': " + msg) end end