FANDOM


-- <nowiki>
--------------------------------------------------------------------------------
-- A less intimidating version of the built-in "error()" function, to help
-- editors fix their mistakes when transcluding a template.
--------------------------------------------------------------------------------
local checkType = require('libraryUtil').checkType
 
return function (message, ...)
    checkType('Dev:User error', 1, message, 'string')
 
    local element = mw.html.create('strong')
        :addClass('error')
        :wikitext('Error: ' .. message .. '.')
 
    for i = 1, select('#', ...) do
        local category = select(i, ...)
 
        checkType('Dev:User error', i + 1, category, 'string')
 
        if category ~= '' then
            element:wikitext('[[Category:' .. category .. ']]')
        end
    end
 
    return tostring(element)
end
 
-- </nowiki>
-- (Add categories here.)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.