Module:Error/doc: Difference between revisions
Appearance
Dat Hack3r (talk | contribs) Fixed example code. |
Dat Hack3r (talk | contribs) m {{Tlx}} is the best template link template. |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
This module implements {{ | This module implements {{Tlx|Error}}. It creates an html message with class "error". Please see the documentation page there for usage instructions. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local mw_error = require('Module:Error').error | local mw_error = require('Module:Error').error | ||
return mw_error("Message") | return mw_error("Message") | ||
return mw_error(("TypeError: %s"):format( | return mw_error(("TypeError: %s"):format(error_message), tag) | ||
</syntaxhighlight> | </syntaxhighlight> | ||