Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
InstallException
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getStatus
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * @license GPL-2.0-or-later
4 * @file
5 */
6
7namespace MediaWiki\Installer;
8
9use MediaWiki\Exception\MWException;
10use StatusValue;
11use Throwable;
12
13/**
14 * Exception thrown if an error occurs during installation
15 * @ingroup Exception
16 */
17class InstallException extends MWException {
18    /**
19     * @var StatusValue The state when an exception occurs
20     */
21    private $status;
22
23    /**
24     * @param StatusValue $status The state when an exception occurs
25     * @param string $message The Exception message to throw
26     * @param int $code The Exception code
27     * @param Throwable|null $previous The previous throwable used for the exception chaining
28     */
29    public function __construct( StatusValue $status, $message = '', $code = 0,
30        ?Throwable $previous = null ) {
31        parent::__construct( $message, $code, $previous );
32        $this->status = $status;
33    }
34
35    public function getStatus(): StatusValue {
36        return $this->status;
37    }
38}