MediaWiki  master
LocalizedHttpException.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Rest;
4 
6 
8  private $messageValue;
9 
10  public function __construct( MessageValue $messageValue, $code = 500, $errorData = null ) {
11  parent::__construct(
12  'Localized exception with key ' . $messageValue->getKey(), $code, $errorData
13  );
14  $this->messageValue = $messageValue;
15  }
16 
17  public function getMessageValue() {
18  return $this->messageValue;
19  }
20 }
This is the base exception class for non-fatal exceptions thrown from REST handlers.
Value object representing a message for i18n.
__construct(MessageValue $messageValue, $code=500, $errorData=null)
getKey()
Get the message key.