<?php

namespace KupShop\KupShopBundle\Exception;

class RedirectException extends \Exception
{
    /**
     * @var string
     */
    protected $redirectUrl;

    public function __construct($redirectUrl = '', $message = '', $code = 0, ?\Throwable $previous = null)
    {
        $this->redirectUrl = $redirectUrl;

        parent::__construct($message, $code, $previous);
    }

    /**
     * @return string
     */
    public function getRedirectUrl()
    {
        return $this->redirectUrl;
    }

    /**
     * @return int
     */
    public function getResponseCode()
    {
        return 302;
    }
}
