diff --git a/src/Transaction.php b/src/Transaction.php index 048d93aed..6ffa743e8 100644 --- a/src/Transaction.php +++ b/src/Transaction.php @@ -153,7 +153,7 @@ public function safeCommit(&$exception = null) $this->clientSession->db->trigger(Connection::EVENT_COMMIT_TRANSACTION); return true; } - catch(\Exception|\Error $e) { + catch(\Throwable $e) { $exception = $e; return false; } @@ -187,7 +187,7 @@ public function safeRollBack(&$exception = null) $this->clientSession->db->trigger(Connection::EVENT_ROLLBACK_TRANSACTION); return true; } - catch(\Exception|\Error $e) { + catch(\Throwable $e) { $exception = $e; return false; } @@ -201,7 +201,7 @@ public function run($query, $throw = false, $log = false){ $this->clientSession->db->setSession($this->clientSession); return $query(); } - catch(\Exception|\Error $e) { + catch(\Throwable $e) { $this->lastRunError = $e; if(!YII_ENV_PROD || $log) { Yii::error($e);