Skip to content

Commit

Permalink
Catching predefined Exception class in PDO statement executions
Browse files Browse the repository at this point in the history
  • Loading branch information
jstruzik authored and sebastianbergmann committed Oct 28, 2017
1 parent 3531db9 commit 3dbad3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Operation/Replace.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function execute(Connection $connection, IDataSet $dataSet)

$insertStatement->execute($insertArgs);
}
} catch (Exception $e) {
} catch (\Exception $e) {
throw new Exception(
$this->operationName, $query, $args, $table, $e->getMessage()
);
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/RowBased.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function execute(Connection $connection, IDataSet $dataSet)

try {
$statement->execute($args);
} catch (Exception $e) {
} catch (\Exception $e) {
throw new Exception(
$this->operationName, $query, $args, $table, $e->getMessage()
);
Expand Down

0 comments on commit 3dbad3b

Please sign in to comment.