Exception.php 1.95 KB
Newer Older
lsmith's avatar
lsmith committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php
/*
 *  $Id$
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * This software consists of voluntary contributions made by many individuals
 * and is licensed under the LGPL. For more information, see
19
 * <http://www.phpdoctrine.org>.
lsmith's avatar
lsmith committed
20
 */
21 22

#namespace Doctrine::ORM::Exceptions;
23

lsmith's avatar
lsmith committed
24 25 26 27
/**
 * Doctrine_Exception
 *
 * @package     Doctrine
28
 * @subpackage  Exception
lsmith's avatar
lsmith committed
29
 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
30
 * @link        www.phpdoctrine.org
lsmith's avatar
lsmith committed
31 32
 * @since       1.0
 * @version     $Revision$
33
 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi>
34 35
 * @author      Roman Borschel <roman@code-factory.org>
 * @todo Rename to DoctrineException
lsmith's avatar
lsmith committed
36
 */
lsmith's avatar
lsmith committed
37
class Doctrine_Exception extends Exception
38 39 40 41 42 43 44 45 46 47 48 49
{ 
    private $_innerException;
    
    public function __construct($message = "", Doctrine_Exception $innerException = null)
    {
        parent::__construct($message);
        $this->_innerException = $innerException;
    }
    
    public function getInnerException()
    {
        return $this->_innerException;
50 51
    }
    
romanb's avatar
romanb committed
52
    public static function notYetImplemented($method, $class)
53 54
    {
        return new self("The method '$method' is not implemented in the class '$class'.");
zYne's avatar
zYne committed
55 56 57
    }

}