Module:LuaError
Jump to navigation
Jump to search
Documentation for this module may be created at Module:LuaError/doc
local p = {}
function p.luaerror(message, depth)
if (type(message) == "table") then
frame = message
message = mw.text.unstripNoWiki(frame.args[1])
depth = tonumber(frame.args[2])
end
if (depth == nil) then
depth = 0
end
if (depth == 0) then
error(message, 0)
end
p.luaerror(message, depth - 1)
end
return p