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.  * This file is released under the LGPL
  10.  * "GNU Lesser General Public License"
  11.  * More information can be found here:
  12.  * {@link http://www.gnu.org/copyleft/lesser.html}
  13.  *
  14.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  15.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  16.  * @license    http://www.gnu.org/copyleft/lesser.html  GNU Lesser General Public License
  17.  * @link       http://dwoo.org/
  18.  * @version    0.9.1
  19.  * @date       2008-05-30
  20.  * @package    Dwoo
  21.  */
  22. {
  23.     protected $compiler;
  24.     protected $template;
  25.  
  26.     public function __construct(Dwoo_Compiler $compiler$message)
  27.     {
  28.         $this->compiler = $compiler;
  29.         $this->template = $compiler->getDwoo()->getTemplate();
  30.         parent::__construct('Compilation error at line '.$compiler->getLine().' in "'.$this->template->getResourceName().':'.$this->template->getResourceIdentifier().'" : '.$message);
  31.     }
  32.  
  33.     public function getCompiler()
  34.     {
  35.         return $this->compiler;
  36.     }
  37.  
  38.     public function getTemplate()
  39.     {
  40.         return $this->template;
  41.     }
  42. }

Documentation generated on Sun, 07 Sep 2008 23:57:46 +0200 by phpDocumentor 1.4.0