mirror of
https://github.com/jekyll/jekyll.git
synced 2026-02-01 02:05:35 -05:00
More descriptive exception
This commit is contained in:
@@ -273,7 +273,7 @@ module Jekyll
|
||||
begin
|
||||
input.to_i
|
||||
rescue
|
||||
raise ArgumentError, "Invalid input object type."
|
||||
raise ArgumentError, "Object '#{input.inspect}' could not be converted into an integer."
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -645,7 +645,7 @@ class TestFilters < JekyllUnitTest
|
||||
|
||||
context "to_integer filter" do
|
||||
should "raise Exception when input is not integer or string" do
|
||||
err_msg = "Invalid input object type."
|
||||
err_msg = "Object '[1, 2]' could not be converted into an integer."
|
||||
err = assert_raises ArgumentError do
|
||||
@filter.to_integer([1, 2])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user