MediaWiki  master
PageAssertionException.php
Go to the documentation of this file.
1 <?php
21 namespace MediaWiki\Page;
22 
23 use InvalidArgumentException;
24 use Throwable;
25 use Wikimedia\NormalizedException\INormalizedException;
26 use Wikimedia\NormalizedException\NormalizedExceptionTrait;
27 
34 class PageAssertionException extends InvalidArgumentException implements INormalizedException {
35 
36  use NormalizedExceptionTrait;
37 
45  public function __construct(
46  string $normalizedMessage = '',
47  array $messageContext = [],
48  int $code = 0,
49  Throwable $previous = null
50  ) {
51  $this->normalizedMessage = $normalizedMessage;
52  $this->messageContext = $messageContext;
53  parent::__construct(
54  self::getMessageFromNormalizedMessage( $normalizedMessage, $messageContext ),
55  $code,
56  $previous
57  );
58  }
59 }
Exception if a PageIdentity is an invalid argument.
__construct(string $normalizedMessage='', array $messageContext=[], int $code=0, Throwable $previous=null)