Skip to content

Commit

Permalink
Dump on metadata create fail
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Nov 26, 2024
1 parent 43180e3 commit bd50243
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Database/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,7 @@ public function createCollection(string $id, array $attributes = [], array $inde
try {
$createdCollection = $this->silent(fn () => $this->createDocument(self::METADATA, $collection));
} catch (Exception $e) {
\var_dump('Error creating collection ' . $id . ' metadata document. Deleting collection.' . "\n" . $e->getMessage() . "\n" . $e->getTraceAsString());
$this->adapter->deleteCollection($id);
throw $e;
}
Expand Down

0 comments on commit bd50243

Please sign in to comment.