From 6425b0464d10dbcf37bf95a358bee66e29c12e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 3 Sep 2020 18:09:53 +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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/system/Cache/Redis.php b/system/Cache/Redis.php index d5798b59..fe384a40 100644 --- a/system/Cache/Redis.php +++ b/system/Cache/Redis.php @@ -284,10 +284,12 @@ class Redis extends Component } else { $data = $this->proxy()->{$name}(...$arguments); } - } catch (RedisConnectException $exception) { - throw new Exception($exception->getMessage()); } catch (\Throwable $exception) { - $this->error(print_r($exception, true)); + $this->error(print_r([ + $exception->getMessage(), + $exception->getFile(), + $exception->getLine() + ], true)); $data = false; } finally { return $data;