InvalidVersionException.php 634 Bytes
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<?php
/**
 * File InvalidVersionException.php
 *
 * @author Edward Pfremmer <epfremme@nerdery.com>
 */
namespace Epfremme\Swagger\Exception;

/**
 * Class InvalidVersionException
 *
 * @package Epfremme\Swagger
 * @subpackage Exception
 */
class InvalidVersionException extends \OutOfBoundsException
{
    // custom exception message
    const EXCEPTION_MESSAGE = "Swagger version '%s' is not supported. Please upgrade to version 2.0 or higher";

    /**
     *
     * @param null $version
     */
    public function __construct($version = null)
    {
        parent::__construct(sprintf(self::EXCEPTION_MESSAGE, $version));
    }
}