Open main menu

Changes

Module:Protection banner

495 bytes added, 05:06, 19 March 2014
make the category name function errors more descriptive
local propertiesKey = categoryOrder[i]
if not propertiesKey then
error(local msg = 'no properties entry found for key' .. i .. ' in the cfg.reasons.' .. reason .. '.categoryOrder table' error(msg)
end
local property = properties[propertiesKey]
if not property then
error(local msg = 'invalid properties keyvalue "' .. propertiesKey .. '" detected in the cfg.reasons.' .. reason .. '.categoryOrder table' error(msg)
end
if dupes[propertypropertiesKey] then error(local msg = 'duplicate values "' .. propertiesKey .. 'dupe " detectedin the cfg.reasons.' .. reason .. '.categoryOrder table' error(msg)
else
dupes[propertypropertiesKey] = true
end
configOrder[i] = property
local property = properties[categoryOrder]
if not property then
local msg = '"' .. categoryOrder .. '" is not a valid value of cfg.reasons.' .. reason .. '.categoryOrder' error('invalid category order string'msg)
end
toTableEnd(configOrder, property.order)
end
end
error( 'No category match found; ' .. ' please define the category for key "all-all-all-all-all"' )
end
Anonymous user