Completed
Push — bash-completion ( 164352...1454d3 )
by Carsten
86:55 queued 83:59
created

ExitException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 4
crap 1
1
<?php
2
/**
3
 * @link http://www.yiiframework.com/
4
 * @copyright Copyright (c) 2008 Yii Software LLC
5
 * @license http://www.yiiframework.com/license/
6
 */
7
8
namespace yii\base;
9
10
/**
11
 * ExitException represents a normal termination of an application.
12
 *
13
 * Do not catch ExitException. Yii will handle this exception to terminate the application gracefully.
14
 *
15
 * @author Qiang Xue <[email protected]>
16
 * @since 2.0
17
 */
18
class ExitException extends \Exception
19
{
20
    /**
21
     * @var int the exit status code
22
     */
23
    public $statusCode;
24
25
26
    /**
27
     * Constructor.
28
     * @param int $status the exit status code
29
     * @param string $message error message
30
     * @param int $code error code
31
     * @param \Exception $previous The previous exception used for the exception chaining.
32
     */
33 3
    public function __construct($status = 0, $message = null, $code = 0, \Exception $previous = null)
34
    {
35 3
        $this->statusCode = $status;
36 3
        parent::__construct($message, $code, $previous);
37 3
    }
38
}
39