<?php

namespace AC_SYNC\Includes\Classes\Api;

if (!defined('ABSPATH'))
    exit; // Exit if accessed directly

class Action_Wear_Api_Exception extends \Exception
{
    private $statusCode;

    public function __construct($statusCode, $message = "", $previous = null)
    {
        $this->statusCode = (int) $statusCode;
        if (empty($message)) {
            $message = "API error with status code: " . $statusCode;
        }
        parent::__construct($message, $statusCode, $previous);
    }

    public function getStatusCode()
    {
        return $this->statusCode;
    }
}
