Last modified: 2013-11-12 08:16:21 UTC
I would like to display exceptions to the end user, but since exceptions cannot be associated with i18n message ids, this is impossible. I assume that this is by design? Otherwise, if it is sometimes appropriate to display messages, they should behave something like: class Surprise extends MWException { function __construct( $arg1, $arg2 ) { $this->mwMessage = wfMessage( 'msgname', $arg1, $arg2 ); } function getMessage() { return $this->mwMessage->text(); } }
You should extends ErrorPageError, if you need i18n. See examples in Exception.php like ReadOnlyError or ThrottledError.
Marking this resolved per comment 1.