Skip to content

Commit

Permalink
Merge pull request #2 from tleliberty/master
Browse files Browse the repository at this point in the history
Transaction rollback on writer flush error
  • Loading branch information
Baachi authored Apr 27, 2018
2 parents 08bc8c7 + ef53442 commit ed20a53
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/PdoWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public function flush()

$this->pdo->commit();
} catch (\PDOException $e) {
$this->pdo->rollBack();
throw new WriterException('Failed to write to database', null, $e);
}
}
Expand Down

0 comments on commit ed20a53

Please sign in to comment.