Skip to content

Commit ed20a53

Browse files
authored
Merge pull request #2 from tleliberty/master
Transaction rollback on writer flush error
2 parents 08bc8c7 + ef53442 commit ed20a53

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/PdoWriter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public function flush()
101101

102102
$this->pdo->commit();
103103
} catch (\PDOException $e) {
104+
$this->pdo->rollBack();
104105
throw new WriterException('Failed to write to database', null, $e);
105106
}
106107
}

0 commit comments

Comments
 (0)