Skip to content

Commit 65dc514

Browse files
authored
Merge pull request #540 from utopia-php/create-index-exception
Add throw for create index
2 parents 9b911d8 + 11b7295 commit 65dc514

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,7 @@ public function createIndex(string $collection, string $id, string $type, array
798798
->prepare($sql)
799799
->execute();
800800
} catch (PDOException $e) {
801-
$this->processException($e);
802-
return false;
801+
throw $this->processException($e);
803802
}
804803
}
805804

src/Database/Adapter/Postgres.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,7 @@ public function createIndex(string $collection, string $id, string $type, array
851851
->prepare($sql)
852852
->execute();
853853
} catch (PDOException $e) {
854-
$this->processException($e);
855-
return false;
854+
throw $this->processException($e);
856855
}
857856
}
858857

0 commit comments

Comments
 (0)