Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ziaratban committed Nov 2, 2023
1 parent 492be62 commit 206e38f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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);
Expand Down

0 comments on commit 206e38f

Please sign in to comment.