Files
hyperf_rbac_framework_serve…/app/Exception/ErrException.php
ctexthuang a1fdeb9148
Some checks are pending
Build Docker / build (push) Waiting to run
fix : jwt
2025-09-12 23:54:21 +08:00

34 lines
640 B
PHP

<?php
namespace App\Exception;
use App\Constants\ResultCode;
use Hyperf\Server\Exception\ServerException;
use Throwable;
class ErrException extends ServerException
{
/**
* @var int
*/
protected $code = ResultCode::ERROR;
/**
* @var array
*/
protected array $data = [];
public function __construct(string $message = "", int $code = 0, array $data = [], ?Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
$this->data = $data;
}
/**
* @return array
*/
public function getData(): array
{
return $this->data;
}
}