* MalformedTitleException is thrown when a TitleParser is unable to parse a title string.
* @since 1.23
*/
-class MalformedTitleException extends Exception {
+class MalformedTitleException extends Exception implements ILocalizedException {
private $titleText = null;
private $errorMessage = null;
private $errorMessageParameters = [];
public function getErrorMessageParameters() {
return $this->errorMessageParameters;
}
+
+ /**
+ * @since 1.29
+ * @return Message
+ */
+ public function getMessageObject() {
+ return wfMessage( $this->getErrorMessage(), $this->getErrorMessageParameters() );
+ }
}