Page MenuHomePhabricator

Please give a special warning when people try to use complex numbers in {{#expr:}}
Closed, DeclinedPublic

Description

Author: theevilipaddress

Description:
I have recently tried to work with the variable "i", i.e. complex numbers in the {{#expr:}} parser function. Of course, this didn't work and gave the error: Expression error: Unrecognised word "i".

However, I was wondering if in case of "i", a more specific error could be thrown, e.g. "MediaWiki does not natively support the calculation of complex numbers.", because I had wondered for some time if I made something wrong.


Version: unspecified
Severity: enhancement

Details

Reference
bz30393
TitleReferenceAuthorSource BranchDest Branch
kubernetes.py: Ensure log messages aren't too largerepos/releng/scap!55dancyreview/dancy/split-big-log-messagesmaster
Send image build/deploy transcripts to syslogrepos/releng/scap!51dancyreview/dancy/T323939-k8s-build-transcriptsmaster
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:53 PM
bzimport added a project: ParserFunctions.
bzimport set Reference to bz30393.
bzimport added a subscriber: Unknown Object (MLST).

can you specify the list of all complex words do that they could be given that specific error?

if this change is to be solved then almost all the .json files in i18n directory have to be added with such specific error what about the languages other than English how could the manipulation in them be done in their own language?

on adding a special kind of warning, the patch at https://gerrit.wikimedia.org/r/#/c/406391/ Jenkins gives a failure due to failure at mwgate-npm-node-6-docker it is given that it has to be documented but where should the warning be documented?

Change 406391 had a related patch set uploaded (by Zoranzoki21; owner: Rammanoj):
[mediawiki/extensions/ParserFunctions@master] Fix give errors on using complex number in {{#expr:}}

https://gerrit.wikimedia.org/r/406391

Change 406391 had a related patch set uploaded (by Zoranzoki21; owner: Rammanoj):
[mediawiki/extensions/ParserFunctions@master] Fix give errors on using complex number in {{#expr:}}

https://gerrit.wikimedia.org/r/406391

thiemowmde subscribed.

I believe an extension that does not support complex numbers should not have special error handling code for complex numbers. If an expression contains an unrecognised word, the error message already says so.

Change 406391 abandoned by Thiemo Kreuz (WMDE):
Fix give errors on using complex number in {{#expr:}}

Reason:
See T32393, as well as what I wrote before.

https://gerrit.wikimedia.org/r/406391