Skip to content

Commit 88d2121

Browse files
committed
intersection: show types in exception due to invalid arguments
1 parent ee1f055 commit 88d2121

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/parser/functions/intersection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module Puppet::Parser::Functions
2222
second = arguments[1]
2323

2424
unless first.is_a?(Array) && second.is_a?(Array)
25-
raise(Puppet::ParseError, 'intersection(): Requires 2 arrays')
25+
raise(Puppet::ParseError, "intersection(): Requires 2 arrays, got #{first.class} and #{second.class}")
2626
end
2727

2828
result = first & second

0 commit comments

Comments
 (0)