Tgr added a comment.

We'd basically map the exception class to a localisation message somewhere, quite similar to what we already do for various exception types in various places. Perhaps we could centralise that a bit within MediaWiki :)

The fundamental concept in MediaWiki's localization system (and in localization systems in general, I suppose) is the separation of message types and parameters. That's hard to do in a wrapper. To take a random example, Guzzle does this:

if (!file_exists($options['verify'])) {
    throw new \InvalidArgumentException(
        "SSL CA bundle not found: {$options['verify']}"
    );
}

Mapping by class is not really useful. Mapping by message would involve regex parsing messages - possible but a bit icky (also fragile).


TASK DETAIL
https://phabricator.wikimedia.org/T110022

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Tgr
Cc: BPirkle, Nikerabbit, Dereckson, Ladsgroup, Krinkle, PokestarFan, Tgr, Lydia_Pintscher, Ricordisamoa, Legoktm, Addshore, Aklapper, Arch2all, Lahi, Gq86, dmaza, GoranSMilovanovic, DFelten, QZanden, LawExplorer, HakanIST, Abbe98, Hannolans, Samwilson, Wikidata-bugs, aude, Dinoguy1000, fbstj, Tpt, Mbch331, bd808
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to