Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Fix DBALStorage to not ignore exceptions #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions lib/Doctrine/KeyValueStore/Storage/DBALStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,10 @@ public function requiresCompositePrimaryKeys()
*/
public function insert($storageName, $key, array $data)
{
try {
$this->conn->insert($this->table, [
$this->keyColumn => $key,
$this->dataColumn => serialize($data),
]);
} catch (\Exception $e) {
}
$this->conn->insert($this->table, [
$this->keyColumn => $key,
$this->dataColumn => serialize($data),
]);
}

/**
Expand All @@ -99,14 +96,11 @@ public function insert($storageName, $key, array $data)
*/
public function update($storageName, $key, array $data)
{
try {
$this->conn->update($this->table, [
$this->dataColumn => serialize($data),
], [
$this->keyColumn => $key,
]);
} catch (\Exception $e) {
}
$this->conn->update($this->table, [
$this->dataColumn => serialize($data),
], [
$this->keyColumn => $key,
]);
}

/**
Expand All @@ -116,10 +110,7 @@ public function update($storageName, $key, array $data)
*/
public function delete($storageName, $key)
{
try {
$this->conn->delete($this->table, [$this->keyColumn => $key]);
} catch (\Exception $e) {
}
$this->conn->delete($this->table, [$this->keyColumn => $key]);
}

/**
Expand Down