2019-07-15 10:24:38 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Rest;
|
|
|
|
|
|
|
|
|
|
use Wikimedia\Message\MessageValue;
|
|
|
|
|
|
|
|
|
|
class LocalizedHttpException extends HttpException {
|
2019-07-16 22:43:43 +00:00
|
|
|
private $messageValue;
|
|
|
|
|
|
2019-09-12 17:44:11 +00:00
|
|
|
public function __construct( MessageValue $messageValue, $code = 500, $errorData = null ) {
|
|
|
|
|
parent::__construct(
|
|
|
|
|
'Localized exception with key ' . $messageValue->getKey(), $code, $errorData
|
|
|
|
|
);
|
2019-07-16 22:43:43 +00:00
|
|
|
$this->messageValue = $messageValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getMessageValue() {
|
|
|
|
|
return $this->messageValue;
|
2019-07-15 10:24:38 +00:00
|
|
|
}
|
|
|
|
|
}
|