perf: 增加原生缓存

This commit is contained in:
Ying
2023-06-19 14:36:07 +08:00
parent 2b8f874450
commit 331d7b0582
1486 changed files with 105475 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace app\common\exception\user;
use app\common\library\ResultCode;
/**
* 用户异常类
* Class UserException
*/
class UserException extends \Exception
{
/**
* 附加数据
* @var array
*/
public array $data = [];
public function __construct($message = '', $code = 0, array $data = [], \Throwable $previous = null)
{
$this->data = $data;
$this->code = $code ?: ResultCode::UNKNOWN['code'];
$this->message = $message ?: ResultCode::UNKNOWN['msg'];
parent::__construct($this->message, $this->code, $previous);
}
}