From 11b7295d54b113e23f257549b7427c554a519be9 Mon Sep 17 00:00:00 2001 From: fogelito Date: Mon, 24 Mar 2025 09:58:11 +0200 Subject: [PATCH] Add throw --- src/Database/Adapter/MariaDB.php | 3 +-- src/Database/Adapter/Postgres.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Database/Adapter/MariaDB.php b/src/Database/Adapter/MariaDB.php index cc7b5338c..ecfe4e3d5 100644 --- a/src/Database/Adapter/MariaDB.php +++ b/src/Database/Adapter/MariaDB.php @@ -798,8 +798,7 @@ public function createIndex(string $collection, string $id, string $type, array ->prepare($sql) ->execute(); } catch (PDOException $e) { - $this->processException($e); - return false; + throw $this->processException($e); } } diff --git a/src/Database/Adapter/Postgres.php b/src/Database/Adapter/Postgres.php index 65d5c076e..2ef065d7b 100644 --- a/src/Database/Adapter/Postgres.php +++ b/src/Database/Adapter/Postgres.php @@ -851,8 +851,7 @@ public function createIndex(string $collection, string $id, string $type, array ->prepare($sql) ->execute(); } catch (PDOException $e) { - $this->processException($e); - return false; + throw $this->processException($e); } }