Modul:TableTools: Unterschied zwischen den Versionen
(only allow two or more arguments for the set functions) |
(better error message for the set functions) |
||
Zeile 93: | Zeile 93: | ||
local lim = select('#', ...) | local lim = select('#', ...) | ||
if lim < 2 then | if lim < 2 then | ||
error( | error("too few arguments to 'union' (minimum is 2, received " .. lim .. ')', 2) | ||
end | end | ||
local ret, trackArrays = {}, {} | local ret, trackArrays = {}, {} | ||
Zeile 139: | Zeile 139: | ||
local lim = select('#', ...) | local lim = select('#', ...) | ||
if lim < 2 then | if lim < 2 then | ||
error( | error("too few arguments to 'valueUnion' (minimum is 2, received " .. lim .. ')', 2) | ||
end | end | ||
local isNan = p.isNan | local isNan = p.isNan | ||
Zeile 169: | Zeile 169: | ||
local lim = select('#', ...) | local lim = select('#', ...) | ||
if lim < 2 then | if lim < 2 then | ||
error( | error("too few arguments to 'intersection' (minimum is 2, received " .. lim .. ')', 2) | ||
end | end | ||
local ret, track, pairCounts = {}, {}, {} | local ret, track, pairCounts = {}, {}, {} | ||
Zeile 205: | Zeile 205: | ||
local lim = select('#', ...) | local lim = select('#', ...) | ||
if lim < 2 then | if lim < 2 then | ||
error( | error("too few arguments to 'valueIntersection' (minimum is 2, received " .. lim .. ')', 2) | ||
end | end | ||
local isNan = p.isNan | local isNan = p.isNan | ||
Zeile 255: | Zeile 255: | ||
local lim = select('#', ...) | local lim = select('#', ...) | ||
if lim < 2 then | if lim < 2 then | ||
error( | error("too few arguments to 'complement' (minimum is 2, received " .. lim .. ')', 2) | ||
end | end | ||
--[[ | --[[ |