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']));