10,317
次編輯
變更
模块:Error
,导入1个版本
local function _error(args)
local message = args.message or args[1] or error('没有指定的-{zh-cn:信息; zh-tw:資訊}-', 2)
message = tostring(message)
local tag = mw.ustring.lower(tostring(args.tag))
-- Generate the html.
:addClass('error')
:wikitext(tostring(args.message or args[1] or error('no message specified', 2))) return tostring(root)
end
function p.error(frame)
local args
if type(frame== mw.argsgetCurrentFrame() == 'table' then
-- We're being called via #invoke. The args are passed through to the module
-- from the template page, so use the args that were passed into the template.