summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/prefix.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/functions/prefix.rb')
-rw-r--r--lib/puppet/parser/functions/prefix.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/prefix.rb b/lib/puppet/parser/functions/prefix.rb
index 243cf18..62211ae 100644
--- a/lib/puppet/parser/functions/prefix.rb
+++ b/lib/puppet/parser/functions/prefix.rb
@@ -21,14 +21,14 @@ Will return: ['pa','pb','pc']
array = arguments[0]
unless array.is_a?(Array)
- raise(Puppet::ParseError, 'prefix(): Requires array to work with')
+ raise Puppet::ParseError, "prefix(): expected first argument to be an Array, got #{array.inspect}"
end
prefix = arguments[1] if arguments[1]
if prefix
unless prefix.is_a?(String)
- raise(Puppet::ParseError, 'prefix(): Requires string to work with')
+ raise Puppet::ParseError, "prefix(): expected second argument to be a String, got #{suffix.inspect}"
end
end