<?php


namespace CCDN\Helpers\Exception;

use Exception;
use Throwable;

/**
 * Class CCDNException
 *
 * @package CCDN\Helpers\Exception
 */
class CCDNException extends Exception
{
    /**
     * @var int
     */
    private $status;

    /**
     * CCDNException constructor.
     *
     * @param  string  $message
     * @param  int  $status
     * @param  int  $code
     * @param  Throwable|null  $previous
     */
    public function __construct($message = '', $status = 400, $code = 0, Throwable $previous = null)
    {

        parent::__construct($message, $code, $previous);
        $this->status = $status;
    }

    /**
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }
}
