From 0a25d932c37d039ddcfb3575af010bcdc3353766 Mon Sep 17 00:00:00 2001 From: yansongda Date: Mon, 8 Jan 2024 23:06:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20`InvalidConfigExce?= =?UTF-8?q?ption`=20(#4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ src/Exception/Exception.php | 5 +++++ src/Exception/InvalidConfigException.php | 15 +++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 src/Exception/InvalidConfigException.php diff --git a/CHANGELOG.md b/CHANGELOG.md index e0d6bfa..3c34d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v1.0.3 + +### added + +- feat: 增加 `InvalidConfigException`(!4) + ## v1.0.2 ### changed diff --git a/src/Exception/Exception.php b/src/Exception/Exception.php index 14612e2..71a948e 100644 --- a/src/Exception/Exception.php +++ b/src/Exception/Exception.php @@ -53,6 +53,11 @@ class Exception extends \Exception public const RESPONSE_EMPTY = 9303; + /** + * 关于配置. + */ + public const CONFIG_ERROR = 9400; + public mixed $extra; public function __construct(string $message = '未知异常', int $code = self::UNKNOWN_ERROR, mixed $extra = null, ?Throwable $previous = null) diff --git a/src/Exception/InvalidConfigException.php b/src/Exception/InvalidConfigException.php new file mode 100644 index 0000000..576d351 --- /dev/null +++ b/src/Exception/InvalidConfigException.php @@ -0,0 +1,15 @@ +