Skip to content

Commit

Permalink
fix: work with non-integer error codes
Browse files Browse the repository at this point in the history
fixes #364
  • Loading branch information
g105b committed Feb 8, 2024
1 parent 388b6f7 commit 70c0ed1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Query/SqlQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public function execute(array $bindings = []):ResultSet {
$lastInsertId = $pdo->lastInsertId();
}
catch(PDOException $exception) {
$code = $exception->getCode();
throw new PreparedStatementException(
$exception->getMessage(),
$exception->getCode(),
$exception
$exception->getMessage() . " (Code $code)",
previous: $exception
);
}
}
Expand Down

0 comments on commit 70c0ed1

Please sign in to comment.