mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user