From c3d673dab42de39a10bcb933021e2e2d2de9d420 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 31 May 2016 18:03:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BConnection=E7=B1=BB=E7=9A=84?= =?UTF-8?q?=E4=BA=8B=E5=8A=A1=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Connection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/db/Connection.php b/library/think/db/Connection.php index 20afc263..b3680d0a 100644 --- a/library/think/db/Connection.php +++ b/library/think/db/Connection.php @@ -545,9 +545,9 @@ abstract class Connection } $this->commit($label); return $result; - } catch (\PDOException $e) { + } catch (\Exception $e) { $this->rollback(); - return false; + throw $e; } } @@ -570,7 +570,7 @@ abstract class Connection $this->linkID->beginTransaction(); } $this->transTimes++; - return null; + return; } /**