Permalink
Browse files

Better message for unknown named args exception

  • Loading branch information...
1 parent d02883c commit 5297c8f6ad8bd9c756f7700cbd815e2128b32b3e @pointlessone committed Mar 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sass/script/funcall.rb
@@ -148,7 +148,7 @@ def perform_sass_fn(function, args, keywords)
if keywords.any?
unknown_args = keywords.keys - function.args.map {|var| var.first.underscored_name }
if unknown_args.any?
- raise Sass::SyntaxError.new("Function #{@name} doesn't have an arguments: #{unknwon_args.map{|name| "$#{name}"}}")
+ raise Sass::SyntaxError.new("Function #{@name} doesn't have an argument#{'s' if unknown_args.length > 1}: #{unknown_args.map{|name| "$#{name}"}.join ', '}")
end
end

0 comments on commit 5297c8f

Please sign in to comment.