Show input in error message

Show date input in error message to make it easier for user
to find infringing date/file
This commit is contained in:
Alfred Xing 2014-08-02 11:51:04 -07:00
parent d5322a73bf
commit 4cfbdb07bb
1 changed files with 2 additions and 2 deletions

View File

@ -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