Community Wishlist Survey 2019/Archive/Stack trace of errors (error handling) by parser functions

From Meta, a Wikimedia project coordination wiki

Stack trace of errors (error handling) by parser functions

NoN Only active registered users can create proposals. Please find someone to adopt your proposal.

  • Problem: When parser function (ex. expr) gets invalid input, it generates error message which sometimes isn't helpful:

Expression error: Unexpected < operator ({{#expr:<span class="error">Error of the Template</span>}}), especially when editing templates which calls other templates (ex. Inflation) and use #iferror with custom error messages (or with incorrect pairs of brackets {}).

  • Who would benefit: Wikipedia editors, Wikipedia template editors
  • Proposed solution: Chain (stack trace) errors (or invalid input):

Expression error: Unexpected < operator: Error of the Template ({{#expr:<span class="error">Error of the Template</span>}}: <span class="error">Error of the Template</span>) on article page, or only in preview

  • More comments:
  • Phabricator tickets:

Discussion