Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * dwoo compilation exception class |
---|
5 | * |
---|
6 | * This software is provided 'as-is', without any express or implied warranty. |
---|
7 | * In no event will the authors be held liable for any damages arising from the use of this software. |
---|
8 | * |
---|
9 | * @author Jordi Boggiano <j.boggiano@seld.be> |
---|
10 | * @copyright Copyright (c) 2008, Jordi Boggiano |
---|
11 | * @license http://dwoo.org/LICENSE Modified BSD License |
---|
12 | * @link http://dwoo.org/ |
---|
13 | * @version 1.0.0 |
---|
14 | * @date 2008-10-23 |
---|
15 | * @package Dwoo |
---|
16 | */ |
---|
17 | class Dwoo_Compilation_Exception extends Dwoo_Exception |
---|
18 | { |
---|
19 | protected $compiler; |
---|
20 | protected $template; |
---|
21 | |
---|
22 | public function __construct(Dwoo_Compiler $compiler, $message) |
---|
23 | { |
---|
24 | $this->compiler = $compiler; |
---|
25 | $this->template = $compiler->getDwoo()->getTemplate(); |
---|
26 | parent::__construct('Compilation error at line '.$compiler->getLine().' in "'.$this->template->getResourceName().':'.$this->template->getResourceIdentifier().'" : '.$message); |
---|
27 | } |
---|
28 | |
---|
29 | public function getCompiler() |
---|
30 | { |
---|
31 | return $this->compiler; |
---|
32 | } |
---|
33 | |
---|
34 | public function getTemplate() |
---|
35 | { |
---|
36 | return $this->template; |
---|
37 | } |
---|
38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.