Page MenuHomePhabricator

Make MWException handle non-MW exceptions better
Closed, DeclinedPublic

Description

Handle non-MW specific exceptions better and refactor code to not needed them. Lots of code depends on MWException right now.

Some exception base class might be needed for structuring bits of data possibly...but should not be MW specific.

Event Timeline

aaron claimed this task.
aaron raised the priority of this task from to Medium.
aaron updated the task description. (Show Details)
aaron moved this task to Backlog on the MediaWiki-Core-Team board.
aaron changed Security from none to None.
aaron subscribed.
aaron renamed this task from Made MWException handle non-MW exceptions better to Make MWException handle non-MW exceptions better.Dec 4 2014, 5:58 PM

@aaron Can you be more specific?

In 2013 I refactored MWException; most logic was moved into static handlers and it no longer special-cases MWException. Handled for e.g. generating IDs and formatting debug log entries is now generic. See 4468a46af2 and f0386d3183.

We still reference the MW class in many places, but other than subclasses for concepts currently MW-specific (like Database, and OutputPage), it should be safe to start phasing it out in favour of plain exceptions. If not, let's find out what's left!

Nemo_bis changed the task status from Open to Stalled.Jan 10 2015, 11:40 AM
Nemo_bis subscribed.

I wrote some complaints about the process in https://gerrit.wikimedia.org/r/184048. Having as much as possible of the process in public is important, as are small things like including reference to this task in the commit message.

@aaron: Please reply (and reset the task status to open).

The handler is OK (I've been doing some unrelated cleanups though). MWException could maybe have some stuff moved out of it, but that's less urgent.