Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
SettingsBuilderException | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Settings; |
4 | |
5 | use RuntimeException; |
6 | use Throwable; |
7 | use Wikimedia\NormalizedException\INormalizedException; |
8 | use Wikimedia\NormalizedException\NormalizedExceptionTrait; |
9 | |
10 | class SettingsBuilderException extends RuntimeException implements INormalizedException { |
11 | use NormalizedExceptionTrait; |
12 | |
13 | /** |
14 | * @param string $normalizedMessage The exception message, with PSR-3 style placeholders. |
15 | * @param array $messageContext Message context, with values for the placeholders. |
16 | * @param int $code The exception code. |
17 | * @param Throwable|null $previous The previous throwable used for the exception chaining. |
18 | */ |
19 | public function __construct( |
20 | string $normalizedMessage = '', |
21 | array $messageContext = [], |
22 | int $code = 0, |
23 | ?Throwable $previous = null |
24 | ) { |
25 | $this->normalizedMessage = $normalizedMessage; |
26 | $this->messageContext = $messageContext; |
27 | parent::__construct( |
28 | self::getMessageFromNormalizedMessage( $normalizedMessage, $messageContext ), |
29 | $code, |
30 | $previous |
31 | ); |
32 | } |
33 | } |