Anonymous user
Module:Protection banner: Difference between revisions
make the category name function errors more descriptive
(fix category name function comments) |
(make the category name function errors more descriptive) |
||
Line 226:
local propertiesKey = categoryOrder[i]
if not propertiesKey then
.. i
.. ' in the cfg.reasons.'
.. reason
.. '.categoryOrder table'
end
local property = properties[propertiesKey]
if not property then
.. propertiesKey
.. '" detected in the cfg.reasons.'
.. reason
.. '.categoryOrder table'
error(msg)
end
if dupes[
local msg = 'duplicate values "'
▲ error('dupe detected')
.. propertiesKey
.. '" detected in the cfg.reasons.'
.. reason
.. '.categoryOrder table'
error(msg)
else
dupes[
end
configOrder[i] = property
Line 246 ⟶ 261:
local property = properties[categoryOrder]
if not property then
local msg = '"'
.. categoryOrder
.. '" is not a valid value of cfg.reasons.'
.. reason
.. '.categoryOrder'
error(msg)
end
toTableEnd(configOrder, property.order)
Line 327 ⟶ 347:
end
end
error(
error('No category match found; please define the category for key "all-all-all-all-all"')▼
'No category match found;'
)
end
|