made error description more helpful
This commit is contained in:
parent
9d259fe315
commit
ecab2eb473
|
@ -7,7 +7,7 @@ module Jekyll
|
||||||
|
|
||||||
def initialize(name)
|
def initialize(name)
|
||||||
all, path, date, slug = *name.sub(/^\//, "").match(MATCHER)
|
all, path, date, slug = *name.sub(/^\//, "").match(MATCHER)
|
||||||
raise ArgumentError.new("invalid post name") unless all
|
raise ArgumentError.new("'#{name}' does not contain valid date and/or title") unless all
|
||||||
@slug = path ? path + slug : slug
|
@slug = path ? path + slug : slug
|
||||||
@date = Time.parse(date)
|
@date = Time.parse(date)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue