Services/WikiTagServiceException.php
author ymh <ymh.work@gmail.com>
Fri, 26 Sep 2014 10:04:40 +0200
changeset 136 f209fcb0df6c
parent 63 774ba82dca59
permissions -rwxr-xr-x
Added tag V00.18 for changeset ab728cb3632c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
63
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
/*
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
 * This file is part of the WikiTagBundle package.
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
 *
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
 * (c) IRI <http://www.iri.centrepompidou.fr/>
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
 *
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
 * For the full copyright and license information, please view the LICENSE
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
 * file that was distributed with this source code.
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
 */
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
namespace IRI\Bundle\WikiTagBundle\Services;
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
class WikiTagServiceException extends \Exception
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
{
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    /**
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
     * The error code
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
     * @var string
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
     */
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
    protected $error_code;
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    public function __construct ($message = "", $code = 0, $previous = null, $error_code = "")
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
    {
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
        parent::__construct($message, $code, $previous);
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
        $this->error_code = $error_code;
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
    }
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    public function getErrorCode() {
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
        return $this->error_code;
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    }
774ba82dca59 add tests and fixtures
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
}