Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 4, 2024
1 parent 6e0fab8 commit a254845
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Database/Drivers/PDO/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public static function exceptionArgs(PDOException $e, ?SqlLiteral $query = null)
[$sqlState, $code] = $e->errorInfo;
$code ??= 0;
} elseif (preg_match('#SQLSTATE\[(.*?)\] \[(.*?)\] (.*)#A', $e->getMessage(), $m)) {
throw new \Exception($e->getMessage(), 0, $e);
$sqlState = $m[1];
$code = (int) $m[2];
} else {
Expand Down

0 comments on commit a254845

Please sign in to comment.