@@ -1600,8 +1600,8 @@ public function createCollection(string $id, array $attributes = [], array $inde
16001600 if ($ created ) {
16011601 try {
16021602 $ this ->adapter ->deleteCollection ($ id );
1603- } catch (\Throwable $ rollbackError ) {
1604- // Log rollback failure but continue throwing original error
1603+ } catch (\Throwable $ e ) {
1604+ // Ignore
16051605 }
16061606 }
16071607 throw new DatabaseException ("Failed to create collection metadata for ' {$ id }': " . $ e ->getMessage (), previous: $ e );
@@ -3295,7 +3295,7 @@ public function createRelationship(
32953295 if ($ junctionCollection !== null ) {
32963296 try {
32973297 $ this ->deleteCollection ($ junctionCollection );
3298- } catch (\Throwable $ rollbackException ) {
3298+ } catch (\Throwable $ e ) {
32993299 // Continue to throw original error
33003300 }
33013301 }
@@ -3350,7 +3350,7 @@ public function createRelationship(
33503350 $ relatedCollection ->setAttribute ('attributes ' , array_filter ($ relatedAttributes , fn ($ attr ) => $ attr ->getId () !== $ twoWayKey ));
33513351 $ this ->updateDocument (self ::METADATA , $ relatedCollection ->getId (), $ relatedCollection );
33523352 });
3353- } catch (\Throwable $ rollbackException ) {
3353+ } catch (\Throwable $ e ) {
33543354 // Continue rollback
33553355 }
33563356
@@ -3537,8 +3537,8 @@ public function updateRelationship(
35373537 $ id ,
35383538 $ oldTwoWayKey
35393539 );
3540- } catch (\Throwable $ rollbackError ) {
3541- // Log rollback failure but continue throwing original error
3540+ } catch (\Throwable $ e ) {
3541+ // Ignore
35423542 }
35433543 }
35443544 throw $ e ;
@@ -3748,7 +3748,7 @@ public function deleteRelationship(string $collection, string $id): bool
37483748 $ id ,
37493749 $ twoWayKey
37503750 );
3751- } catch (\Throwable $ rollbackError ) {
3751+ } catch (\Throwable $ e ) {
37523752 // Log rollback failure but don't throw - we're already handling an error
37533753 }
37543754 throw new DatabaseException ('Failed to persist metadata after retries: ' . $ e ->getMessage ());
@@ -9089,14 +9089,14 @@ private function updateMetadata(
90899089 // Silent mode: swallow rollback errors
90909090 try {
90919091 $ rollbackOperation ();
9092- } catch (\Throwable $ rollbackError ) {
9092+ } catch (\Throwable $ e ) {
90939093 // Silent rollback - errors are swallowed
90949094 }
90959095 } else {
90969096 // Regular mode: rollback throws on failure
90979097 try {
90989098 $ rollbackOperation ();
9099- } catch (\Throwable $ rollbackException ) {
9099+ } catch (\Throwable $ e ) {
91009100 throw new DatabaseException (
91019101 "Failed to persist metadata after retries and cleanup failed for {$ operationDescription }: " . $ e ->getMessage () . ' | Cleanup error: ' . $ rollbackException ->getMessage (),
91029102 previous: $ e
0 commit comments