Module:Error
- Afrikaans
- Алтай тил
- Аԥсшәа
- العربية
- অসমীয়া
- Asturianu
- Azərbaycanca
- تۆرکجه
- Basa Bali
- বাংলা
- 閩南語 / Bân-lâm-gí
- Башҡортса
- Беларуская
- Беларуская (тарашкевіца)
- भोजपुरी
- Bikol Central
- Български
- Bosanski
- Brezhoneg
- Català
- Чӑвашла
- Cebuano
- Čeština
- Chamoru
- Chavacano de Zamboanga
- Chi-Chewa
- Corsu
- Cymraeg
- Dansk
- الدارجة
- ދިވެހިބަސް
- Eesti
- Esperanto
- Euskara
- Farefare
- فارسی
- Føroyskt
- Frysk
- Gaelg
- Galego
- ГӀалгӀай
- 贛語
- گیلکی
- ગુજરાતી
- गोंयची कोंकणी / Gõychi Konknni
- 客家語 / Hak-kâ-ngî
- 한국어
- Hausa
- Հայերեն
- हिन्दी
- Hornjoserbsce
- Hrvatski
- Ilokano
- Bahasa Indonesia
- Ирон
- IsiXhosa
- Íslenska
- Jawa
- ಕನ್ನಡ
- Kapampangan
- ქართული
- کٲشُر
- Ikirundi
- Kurdî
- Ladin
- Latina
- Latviešu
- Lietuvių
- मैथिली
- Македонски
- മലയാളം
- Malti
- Māori
- मराठी
- მარგალური
- مصرى
- ဘာသာမန်
- مازِرونی
- Bahasa Melayu
- 閩東語 / Mìng-dĕ̤ng-ngṳ̄
- Мокшень
- Монгол
- မြန်မာဘာသာ
- Na Vosa Vakaviti
- Nederlands
- 日本語
- Нохчийн
- Norsk bokmål
- Novial
- ଓଡ଼ିଆ
- Oʻzbekcha / ўзбекча
- ਪੰਜਾਬੀ
- पालि
- Pangasinan
- پښتو
- Polski
- Português
- Qaraqalpaqsha
- Română
- Русиньскый
- Русский
- Sakizaya
- संस्कृतम्
- ᱥᱟᱱᱛᱟᱲᱤ
- سرائیکی
- Scots
- Seeltersk
- Setswana
- Shqip
- සිංහල
- Simple English
- سنڌي
- Slovenščina
- کوردی
- Српски / srpski
- Srpskohrvatski / српскохрватски
- Sunda
- Tagalog
- தமிழ்
- တႆး
- తెలుగు
- ไทย
- ትግርኛ
- Тоҷикӣ
- ತುಳು
- Türkçe
- Удмурт
- Українська
- اردو
- Tiếng Việt
- Volapük
- Walon
- 文言
- Winaray
- 吴语
- Yorùbá
- 粵語
- 中文
- Kumoring
- ᥖᥭᥰ ᥖᥬᥲ ᥑᥨᥒᥰ
Appearance
From Wikipedia, the free encyclopedia
Warning This Lua module is used on approximately 51,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them.
This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing.
Page template-protected This module is currently protected from editing.
See the protection policy and protection log for more details. Please discuss any changes on the talk page; you may submit an edit request to ask an administrator to make an edit if it is uncontroversial or supported by consensus. You may also request that this page be unprotected.
See the protection policy and protection log for more details. Please discuss any changes on the talk page; you may submit an edit request to ask an administrator to make an edit if it is uncontroversial or supported by consensus. You may also request that this page be unprotected.
This module implements {{Error }}. It creates an html message with class "error". Please, see the documentation page there for usage instructions.
See also
The above documentation is transcluded from Module:Error/doc. (edit | history)
Editors can experiment in this module's sandbox (edit | diff) and testcases (edit | run) pages.
Subpages of this module.
Editors can experiment in this module's sandbox (edit | diff) and testcases (edit | run) pages.
Subpages of this module.
-- This module implements {{error}}. localp={} functionp._error(args) localtag=mw.ustring.lower(tostring(args.tag)) -- Work out what html tag we should use. ifnot(tag=='p'ortag=='span'ortag=='div')then tag='strong' end -- Generate the html. returntostring(mw.html.create(tag) :addClass('error') :cssText(args.style) :wikitext(tostring(args.messageorargs[1]orerror('no message specified',2))) ) end functionp.error(frame) localargs iftype(frame.args)=='table'then -- We're being called via #invoke. The args are passed through to the module -- from the template page, so use the args that were passed into the template. args=frame.args else -- We're being called from another module or from the debug console, so assume -- the args are passed in directly. args=frame end -- if the message parameter is present but blank, change it to nil so that Lua will -- consider it false. ifargs.message==""then args.message=nil end returnp._error(args) end returnp