Jump to content

Module:Error/doc: Difference between revisions

Dat Hack3r (talk | contribs)
Added example code.
Dat Hack3r (talk | contribs)
Fixed example code.
Line 2: Line 2:


<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local error = require('Module:Error')
local mw_error = require('Module:Error').error
error("Message")
return mw_error("Message")
error(("TypeWarning: %s"):format(warning), tag)
return mw_error(("TypeError: %s"):format(warning), tag)
</syntaxhighlight>
</syntaxhighlight>