Skip to content

Commit

Permalink
fix: Also wrap doctrine exceptions when calling execute directly
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed May 24, 2023
1 parent e603826 commit 66fdd03
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/private/DB/QueryBuilder/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,12 @@ public function execute() {
]);
}

$result = $this->queryBuilder->execute();
try {
$result = $this->queryBuilder->execute();
} catch (\Doctrine\DBAL\Exception $e) {
throw \OC\DB\Exceptions\DbalException::wrap($e);
}

if (is_int($result)) {
return $result;
}
Expand Down

0 comments on commit 66fdd03

Please sign in to comment.