diff --git a/Annotation/Inject.php b/Annotation/Inject.php index 39f746c2..3c1cef4d 100644 --- a/Annotation/Inject.php +++ b/Annotation/Inject.php @@ -4,10 +4,8 @@ namespace Annotation; -use ReflectionException; +use Exception; use ReflectionProperty; -use Snowflake\Exception\ComponentException; -use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake; /** @@ -31,9 +29,7 @@ use Snowflake\Snowflake; /** * @param array $handler * @return mixed - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function execute(array $handler): mixed { @@ -58,9 +54,7 @@ use Snowflake\Snowflake; /** * @return mixed - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ private function parseInjectValue(): mixed { diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 8f9ca7b6..873516fd 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -227,9 +227,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess /** * @return mixed - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception * get last exception or other error */ public function getLastError(): mixed diff --git a/Database/Connection.php b/Database/Connection.php index 8adc5c7a..bbeb384a 100644 --- a/Database/Connection.php +++ b/Database/Connection.php @@ -107,9 +107,7 @@ class Connection extends Component /** - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function fill() { @@ -165,9 +163,7 @@ class Connection extends Component /** * @return mixed - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function getCacheDriver(): mixed { @@ -203,9 +199,7 @@ class Connection extends Component /** * @return \Snowflake\Pool\Connection - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ private function connections(): \Snowflake\Pool\Connection { @@ -293,9 +287,7 @@ class Connection extends Component /** - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function recovery() { diff --git a/HttpServer/Client/Http2.php b/HttpServer/Client/Http2.php index 4cfeb398..6046ea62 100644 --- a/HttpServer/Client/Http2.php +++ b/HttpServer/Client/Http2.php @@ -108,9 +108,6 @@ class Http2 extends Component * @param int $timeout * @param bool $isUpload * @return mixed - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException * @throws Exception */ private function dispatch($domain, $path, $method, $params = [], $timeout = -1, $isUpload = false): mixed @@ -204,9 +201,6 @@ class Http2 extends Component * @param bool $isSsl * @param int $timeout * @return H2Client - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException * @throws Exception */ private function getClient($domain, $isSsl = false, $timeout = -1): H2Client diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index b38894ae..d7b444db 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -315,9 +315,6 @@ class Node extends HttpService * @param string $className * @param string $action * @return Node - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException * @throws Exception */ public function annotationInject(string $className, string $action): Node diff --git a/Rpc/Client.php b/Rpc/Client.php index ddd4d545..6d0048a2 100644 --- a/Rpc/Client.php +++ b/Rpc/Client.php @@ -5,12 +5,9 @@ namespace Rpc; use Exception; -use ReflectionException; use Snowflake\Abstracts\Component; use Snowflake\Channel; use Snowflake\Core\Json; -use Snowflake\Exception\ComponentException; -use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake; use Swoole\Coroutine\Client as CClient; @@ -64,9 +61,6 @@ class Client extends Component /** * @return Client - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException * @throws Exception */ public function clientRecover(): static @@ -117,9 +111,6 @@ class Client extends Component /** * @return mixed - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException * @throws Exception */ public function getClient(): CClient diff --git a/Rpc/Producer.php b/Rpc/Producer.php index f13fc3fd..d4dd871c 100644 --- a/Rpc/Producer.php +++ b/Rpc/Producer.php @@ -6,10 +6,7 @@ namespace Rpc; use Exception; use JetBrains\PhpStorm\ArrayShape; -use ReflectionException; use Snowflake\Abstracts\Component; -use Snowflake\Exception\ComponentException; -use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake; @@ -118,9 +115,6 @@ class Producer extends Component * @param string $name * @param string|null $host * @return mixed - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException * @throws Exception */ public function getClient(string $name, string $host = null): Client @@ -149,9 +143,7 @@ class Producer extends Component * @param string $name * @param string|null $host * @return Client - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function consumer(string $name, string $host = null): Client { diff --git a/System/Abstracts/BaseApplication.php b/System/Abstracts/BaseApplication.php index 02bb01c2..cc45a847 100644 --- a/System/Abstracts/BaseApplication.php +++ b/System/Abstracts/BaseApplication.php @@ -319,9 +319,7 @@ abstract class BaseApplication extends Service /** * @return Connection - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function getMysqlFromPool(): Connection { @@ -331,9 +329,7 @@ abstract class BaseApplication extends Service /** * @return SRedis - * @throws NotFindClassException - * @throws ReflectionException - * @throws ComponentException + * @throws Exception */ public function getRedisFromPool(): SRedis { @@ -453,9 +449,7 @@ abstract class BaseApplication extends Service /** * @return \Rpc\Producer - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function getRpc(): \Rpc\Producer { @@ -465,9 +459,7 @@ abstract class BaseApplication extends Service /** * @return Channel - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function getChannel(): Channel { diff --git a/System/Pool/Pool.php b/System/Pool/Pool.php index c1f9d91d..4e6bd880 100644 --- a/System/Pool/Pool.php +++ b/System/Pool/Pool.php @@ -5,10 +5,8 @@ declare(strict_types=1); namespace Snowflake\Pool; -use ReflectionException; +use Exception; use Snowflake\Abstracts\BaseObject; -use Snowflake\Exception\ComponentException; -use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake; /** @@ -23,9 +21,7 @@ class Pool extends BaseObject /** * @return Redis - * @throws ComponentException - * @throws ReflectionException - * @throws NotFindClassException + * @throws Exception */ public function getRedis(): Redis { @@ -34,9 +30,7 @@ class Pool extends BaseObject /** * @return Connection - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public function getDb(): Connection { diff --git a/System/Snowflake.php b/System/Snowflake.php index 6cf263ba..2e146df9 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -61,9 +61,7 @@ class Snowflake * @param $alias * @param array $array * @return mixed - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public static function set($alias, $array = []): mixed {