These methods aren't identical, so consolidation isn't
immediately obvious, and creating dependencies is problematic
in error handling code given there is a lot of pressure on this
code to not by itself cause additional errors.
This means that maybe it's best to keep these inlined without
duplication, but at the very least we then need to remember
to keep these in sync. This duplication has been around for
a while now, but documentation can never come too late...
Change-Id: I60160f61c13c8e115d839acce222f110e30bc2f2
global $wgSitename;
$args = array_slice( func_get_args(), 2 );
+ // FIXME: Keep logic in sync with MWExceptionRenderer::msg.
$res = false;
if ( $this->useMessageCache() ) {
try {
private static function msg( $key, $fallback /*[, params...] */ ) {
global $wgSitename;
$args = array_slice( func_get_args(), 2 );
+
+ // FIXME: Keep logic in sync with MWException::msg.
try {
$res = wfMessage( $key, $args )->text();
} catch ( Exception $e ) {