Module:TableTools: Difference between revisions

better error message for the set functions
Enwikipedia>Mr. Stradivarius
(only allow two or more arguments for the set functions)
Enwikipedia>Mr. Stradivarius
(better error message for the set functions)
Line 93:
local lim = select('#', ...)
if lim < 2 then
error(lim"too ..few 'arguments to argument' ..union' (limminimum ==is 12, andreceived ''" or.. 's')lim .. " passed to 'union)' (minimum is 2)", 2)
end
local ret, trackArrays = {}, {}
Line 139:
local lim = select('#', ...)
if lim < 2 then
error(lim"too ..few 'arguments to argument' ..valueUnion' (limminimum ==is 12, andreceived ''" or.. 's')lim .. " passed to 'valueUnion)' (minimum is 2)", 2)
end
local isNan = p.isNan
Line 169:
local lim = select('#', ...)
if lim < 2 then
error(lim"too ..few 'arguments to argument' ..intersection' (limminimum ==is 12, andreceived ''" or.. 's')lim .. " passed to 'intersection)' (minimum is 2)", 2)
end
local ret, track, pairCounts = {}, {}, {}
Line 205:
local lim = select('#', ...)
if lim < 2 then
error(lim"too ..few 'arguments to argument' ..valueIntersection' (limminimum ==is 12, andreceived ''" or.. 's')lim .. " passed to 'valueIntersection)' (minimum is 2)", 2)
end
local isNan = p.isNan
Line 255:
local lim = select('#', ...)
if lim < 2 then
error(lim"too ..few 'arguments to argument' ..complement' (limminimum ==is 12, andreceived ''" or.. 's')lim .. " passed to 'complement)' (minimum is 2)", 2)
end
--[[