From d4d1dd4b2b85b82cbd58977bc60f34e84dd32014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 3 Sep 2020 18:04:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/Cache/Redis.php | 2 ++ system/Pool/Redis.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/system/Cache/Redis.php b/system/Cache/Redis.php index 529d12bd..8ce787d8 100644 --- a/system/Cache/Redis.php +++ b/system/Cache/Redis.php @@ -293,6 +293,7 @@ class Redis extends Component /** * 释放连接池 + * @throws ConfigException */ public function release() { @@ -302,6 +303,7 @@ class Redis extends Component /** * 销毁连接池 + * @throws ConfigException */ public function destroy() { diff --git a/system/Pool/Redis.php b/system/Pool/Redis.php index e6566cba..6494279b 100644 --- a/system/Pool/Redis.php +++ b/system/Pool/Redis.php @@ -88,7 +88,7 @@ class Redis extends Pool { $redis = new SRedis(); if (!$redis->connect($config['host'], $config['port'], $config['timeout'])) { - throw new Exception('The Redis Connect Fail.'); + throw new Exception(sprintf('The Redis Connect %s::%d Fail.', $config['host'], $config['port'])); } if (empty($config['auth']) || !$redis->auth($config['auth'])) { throw new Exception(sprintf('Redis Error: %s, Host %s, Auth %s', $redis->getLastError(), $config['host'], $config['auth']));