Module:Error: Difference between revisions

Content deleted Content added
simplify code some more and trim whitespace from the message
actually, don't trim whitespace, as the original template doesn't do this
Line 7:
local function _error(args)
local message = args.message or args[1] or error('no message specified', 2)
message = mw.ustring.match(tostring(message), '^%s*(.*%S)') or '' -- Convert message to string and trim whitespace.
local tag = mw.ustring.lower(tostring(args.tag))