Module:Utils: Difference between revisions
From Halopedia, the Halo wiki
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
function utils.error( ... ) | function utils.error( ... ) | ||
-- Collect necessary information to display error | -- Collect necessary information to display error | ||
local | local args = select( 'args', ... ) | ||
local etype = | local message = args[1] or 'There was an error with a template. Are the parameters all correct?' | ||
local category = | local etype = args[2] or 'Template' | ||
local template = | local category = args[3] or 'Pages containing template errors' | ||
local template = args[4] or nil | |||
-- Add a warning to the edit preview | -- Add a warning to the edit preview | ||
if template == nil then | if template == nil then | ||
Line 24: | Line 23: | ||
.. ']]' | .. ']]' | ||
end | end | ||
return utils | return utils |