Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 44.44% |
Changes | 0 |
1 | <?php |
||
16 | class Exception extends \yii\base\Exception |
||
17 | { |
||
18 | /** |
||
19 | * @var array the error info provided by a PDO exception. This is the same as returned |
||
20 | * by [PDO::errorInfo](https://www.php.net/manual/en/pdo.errorinfo.php). |
||
21 | */ |
||
22 | public $errorInfo = []; |
||
23 | |||
24 | |||
25 | /** |
||
26 | * Constructor. |
||
27 | * @param string $message PDO error message |
||
28 | * @param array $errorInfo PDO error info |
||
29 | * @param string $code PDO error code |
||
30 | * @param \Throwable|null $previous The previous exception used for the exception chaining. |
||
31 | */ |
||
32 | 2 | public function __construct($message, $errorInfo = [], $code = '', $previous = null) |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return string the user-friendly name of this exception |
||
41 | */ |
||
42 | public function getName() |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return string readable representation of exception |
||
49 | */ |
||
50 | public function __toString() |
||
56 |