From fb1124a91d94bab613b0e7197df05884e0bd3719 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 28 Jun 2017 13:36:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BConnection=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Connection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/db/Connection.php b/library/think/db/Connection.php index fa773e51..2c2b9a8c 100644 --- a/library/think/db/Connection.php +++ b/library/think/db/Connection.php @@ -386,7 +386,7 @@ abstract class Connection return $this->close()->query($sql, $bind, $master, $pdo); } throw new PDOException($e, $this->config, $this->getLastsql()); - } catch (\ErrorException $e) { + } catch (\Exception $e) { if ($this->isBreak($e)) { return $this->close()->query($sql, $bind, $master, $pdo); } @@ -449,7 +449,7 @@ abstract class Connection return $this->close()->execute($sql, $bind); } throw new PDOException($e, $this->config, $this->getLastsql()); - } catch (\ErrorException $e) { + } catch (\Exception $e) { if ($this->isBreak($e)) { return $this->close()->execute($sql, $bind); }