正在显示
2 个修改的文件
包含
11 行增加
和
1 行删除
| @@ -5,6 +5,7 @@ namespace Lackoxygen\TiktokShop; | @@ -5,6 +5,7 @@ namespace Lackoxygen\TiktokShop; | ||
| 5 | use Illuminate\Support\Arr; | 5 | use Illuminate\Support\Arr; |
| 6 | use Lackoxygen\TiktokShop\Attribute\Config\Config; | 6 | use Lackoxygen\TiktokShop\Attribute\Config\Config; |
| 7 | use Lackoxygen\TiktokShop\Attribute\Config\Option; | 7 | use Lackoxygen\TiktokShop\Attribute\Config\Option; |
| 8 | +use Lackoxygen\TiktokShop\Exception\RequestNotFoundException; | ||
| 8 | use Lackoxygen\TiktokShop\Request\RequestProxy; | 9 | use Lackoxygen\TiktokShop\Request\RequestProxy; |
| 9 | use Lackoxygen\TiktokShop\Support\Verify; | 10 | use Lackoxygen\TiktokShop\Support\Verify; |
| 10 | 11 | ||
| @@ -115,6 +116,7 @@ class Application | @@ -115,6 +116,7 @@ class Application | ||
| 115 | /** | 116 | /** |
| 116 | * @param string $name | 117 | * @param string $name |
| 117 | * @return RequestProxy|object | 118 | * @return RequestProxy|object |
| 119 | + * @throws RequestNotFoundException | ||
| 118 | */ | 120 | */ |
| 119 | private function guide(string $name) | 121 | private function guide(string $name) |
| 120 | { | 122 | { |
| @@ -127,7 +129,7 @@ class Application | @@ -127,7 +129,7 @@ class Application | ||
| 127 | $request = '\Lackoxygen\TiktokShop\Request\\' . $name . '\\' . $name; | 129 | $request = '\Lackoxygen\TiktokShop\Request\\' . $name . '\\' . $name; |
| 128 | 130 | ||
| 129 | if (!class_exists($request)) { | 131 | if (!class_exists($request)) { |
| 130 | - throw new \OverflowException('class file(' . $request . ') not found'); | 132 | + throw new RequestNotFoundException('class file(' . $request . ') not found'); |
| 131 | } | 133 | } |
| 132 | 134 | ||
| 133 | return RequestProxy::proxy($request, $this->config); | 135 | return RequestProxy::proxy($request, $this->config); |
| @@ -138,6 +140,7 @@ class Application | @@ -138,6 +140,7 @@ class Application | ||
| 138 | * @param array $arguments | 140 | * @param array $arguments |
| 139 | * | 141 | * |
| 140 | * @return RequestProxy | 142 | * @return RequestProxy |
| 143 | + * @throws RequestNotFoundException | ||
| 141 | */ | 144 | */ |
| 142 | public function __call($name, array $arguments = []) | 145 | public function __call($name, array $arguments = []) |
| 143 | { | 146 | { |
-
请 注册 或 登录 后发表评论