MediaWiki master
PageAssertionException.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\Page;
22
23use InvalidArgumentException;
24use Throwable;
25use Wikimedia\NormalizedException\INormalizedException;
26use Wikimedia\NormalizedException\NormalizedExceptionTrait;
27
34class 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)