-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResolutionException.php
More file actions
47 lines (41 loc) · 1.23 KB
/
Copy pathResolutionException.php
File metadata and controls
47 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* =============================================================================
* Copyright (c) 2013, Philip Graham
* All rights reserved.
*
* This file is part of php-code-templates and is licensed by the Copyright
* holder under the 3-clause BSD License. The full text of the license can be
* found in the LICENSE.txt file included in the root directory of this
* distribution or at the link below.
* =============================================================================
*
* @license http://www.opensource.org/licenses/bsd-license.php
*/
namespace zpt\pct;
use \Exception;
/**
* High level exception for exceptions that occur while resolving a template.
*
* @author Philip Graham <[email protected]>
*/
class ResolutionException extends Exception {
private $lineNum;
private $templatePath;
private $values;
public function __construct(
$templatePath,
$lineNum,
$values,
Exception $e = null
) {
$this->templatePath = $templatePath;
$this->lineNum = $lineNum;
$this->values = $values;
$msg = "An exception occured while resolving $templatePath at line $lineNum";
if ($e !== null) {
$msg .= ": {$e->getMessage()}";
}
parent::__construct($msg, $e !== null ? $e->getCode() : 0, $e);
}
}