From 8e9047de8afa33b469ff7c9642c657a2aba7b8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 10 Nov 2021 15:15:30 +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 --- src/Mysql/PDO.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Mysql/PDO.php b/src/Mysql/PDO.php index f80e59b..d352971 100644 --- a/src/Mysql/PDO.php +++ b/src/Mysql/PDO.php @@ -212,14 +212,12 @@ class PDO implements StopHeartbeatCheck throw new Exception($this->_pdo()->errorInfo()[1]); } return $this->bindValue($statement, $params); - } catch (\Throwable $throwable) { - + } catch (\PDOException | \Throwable $throwable) { if (str_contains($throwable->getMessage(), 'MySQL server has gone away')) { $this->pdo = null; return $this->queryPrev($sql, $params); } - throw new Exception($throwable->getMessage()); } }