Skip to content

Commit

Permalink
Added additional catchable exception code
Browse files Browse the repository at this point in the history
  • Loading branch information
batumibiz committed Nov 22, 2023
1 parent cfc711a commit 29b4009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Db/PdoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private function connect(array $config): PDO
$code = (int) $exception->getCode();

throw match ($code) {
1045 => new InvalidCredentialsException('Invalid database credentials (user, password)', $code),
1045, 2054 => new InvalidCredentialsException('Invalid database credentials (user, password)', $code),
1049 => new InvalidDatabaseException('Unknown database', $code),
default => new CommonException($exception->getMessage(), $code)
};
Expand Down

0 comments on commit 29b4009

Please sign in to comment.