Source for file Exception.php

Documentation is available at Exception.php

  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. {
  18.     protected $compiler;
  19.     protected $template;
  20.  
  21.     public function __construct(Dwoo_Compiler $compiler$message)
  22.     {
  23.         $this->compiler = $compiler;
  24.         $this->template = $compiler->getDwoo()->getTemplate();
  25.         parent::__construct('Compilation error at line '.$compiler->getLine().' in "'.$this->template->getResourceName().':'.$this->template->getResourceIdentifier().'" : '.$message);
  26.     }
  27.  
  28.     public function getCompiler()
  29.     {
  30.         return $this->compiler;
  31.     }
  32.  
  33.     public function getTemplate()
  34.     {
  35.         return $this->template;
  36.     }
  37. }

Documentation generated on Sun, 07 Feb 2010 17:53:42 +0000 by phpDocumentor 1.4.0