Module:Error/doc: Difference between revisions
Jump to navigation
Jump to search
Dat Hack3r (talk | contribs) (Fixed example code.) |
Dat Hack3r (talk | contribs) m (Change variable names in example code.) |
||
Line 4: | Line 4: | ||
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> | ||
Revision as of 13:42, 2 December 2024
This module implements {{Error}}. It creates an html message with class "error". Please see the documentation page there for usage instructions.
local mw_error = require('Module:Error').error
return mw_error("Message")
return mw_error(("TypeError: %s"):format(error_message), tag)