Completed
Push — master ( b36efb...11b790 )
by Mr
02:17
created

Exception   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace DrMVC\Framework;
4
5
/**
6
 * Class Exception
7
 * @package DrMVC\Framework
8
 */
9
class Exception extends \Exception
10
{
11
    public function __construct(string $message = "", int $code = 0, \Throwable $previous = null)
12
    {
13
        parent::__construct($message, $code, $previous);
14
15
        error_log(
16
            'Uncaught Error: ' . $this->getMessage() . ' in ' . $this->getFile() . ':' . $this->getLine() . "\n"
17
            . "Stack trace:\n" . $this->getTraceAsString() . "\n"
18
            . '  thrown in ' . $this->getFile() . ' on line ' . $this->getLine()
19
        );
20
    }
21
}
22