Template:Formatting error

From Wikibooks, open books for an open world
Jump to: navigation, search

Error in template

Template documentation[edit] [history] [purge]

Outputs an error message in red into the page. An anchor (FormattingError) is inserted at the start of the error message, so you can find any errors on a page easily by adding #FormattingError at the end of the URL (e.g. Blah#FormattingError). Used in complex templates that check their arguments for validity, so incorrect use can be spotted while editing a page or afterwards.

Usage

  • {{Formatting error|error message}}

This template can be evaluated using the {{#iferror}} parser function:

  • {{#iferror:{{val|XX}}|error|OK}}error

See also