Page MenuHomePhabricator

Rewrite LogicException using safer alternatives
Open, Needs TriagePublic

Description

Any throw new LogicException should be rewritten to:

  • Log at error or warning level, making sure this will be tagged with the extension name.
  • Safely escape from the unknown state. Degrade the output if necessary (for a dramatic example, don't process any remaining references) but without the fatal exception. Another possibility is to throw a recoverable exception and catch it elsewhere.

Details

Related Gerrit Patches:

Event Timeline

awight created this task.Jan 20 2020, 3:58 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 20 2020, 3:58 PM

Change 567971 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Remove one unnecessary LogicException from ReferenceStack

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

Change 567971 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Remove one unnecessary LogicException from ReferenceStack

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