Exception::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
rs 10
cc 2
nc 2
nop 3
1
<?php
2
/* @description     Transformation Style Sheets - Revolutionising PHP templating    *
3
 * @author          Tom Butler [email protected]                                             *
4
 * @copyright       2017 Tom Butler <[email protected]> | https://r.je/                      *
5
 * @license         http://www.opensource.org/licenses/bsd-license.php  BSD License *
6
 * @version         1.2                                                             */
7
namespace Transphporm;
8
class Exception extends \Exception {
9
    const PROPERTY = 'property';
10
    const TSS_FUNCTION = 'function';
11
    const PSEUDO = 'pseudo';
12
    const FORMATTER = 'formatter';
13
14
    public function __construct(RunException $runException, $file, $line) {
15
        $message = $runException->getMessage() . ' on Line ' . $line . ' of ' . ($file === null ? 'tss' : $file);
16
17
        parent::__construct($message, 0, $runException->getPrevious());
18
    }
19
}
20