Skip to content

Commit

Permalink
add missing exception suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Mar 12, 2024
1 parent 326a56f commit a5df924
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Exception;


class UnknownMysqlTimezone extends QueryException
class UnknownMysqlTimezoneException extends QueryException
{
public function __construct(
string $message,
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/Mysqli/MysqliDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Nextras\Dbal\Drivers\Exception\NotNullConstraintViolationException;
use Nextras\Dbal\Drivers\Exception\QueryException;
use Nextras\Dbal\Drivers\Exception\UniqueConstraintViolationException;
use Nextras\Dbal\Drivers\Exception\UnknownMysqlTimezone;
use Nextras\Dbal\Drivers\Exception\UnknownMysqlTimezoneException;
use Nextras\Dbal\Drivers\IDriver;
use Nextras\Dbal\Exception\InvalidStateException;
use Nextras\Dbal\Exception\NotSupportedException;
Expand Down Expand Up @@ -370,7 +370,7 @@ protected function createException(string $error, int $errorNo, string $sqlState
} elseif (in_array($errorNo, [1048, 1121, 1138, 1171, 1252, 1263, 1566], true)) {
return new NotNullConstraintViolationException($error, $errorNo, $sqlState, null, $query);
} elseif ($errorNo === 1298) {
return new UnknownMysqlTimezone($error, $errorNo, $sqlState, null, $query);
return new UnknownMysqlTimezoneException($error, $errorNo, $sqlState, null, $query);
} elseif ($query !== null) {
return new QueryException($error, $errorNo, $sqlState, null, $query);
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/PdoMysql/PdoMysqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Nextras\Dbal\Drivers\Exception\NotNullConstraintViolationException;
use Nextras\Dbal\Drivers\Exception\QueryException;
use Nextras\Dbal\Drivers\Exception\UniqueConstraintViolationException;
use Nextras\Dbal\Drivers\Exception\UnknownMysqlTimezone;
use Nextras\Dbal\Drivers\Exception\UnknownMysqlTimezoneException;
use Nextras\Dbal\Drivers\IDriver;
use Nextras\Dbal\Drivers\Pdo\PdoDriver;
use Nextras\Dbal\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -155,7 +155,7 @@ protected function createException(string $error, int $errorNo, string $sqlState
} elseif (in_array($errorNo, [1048, 1121, 1138, 1171, 1252, 1263, 1566], true)) {
return new NotNullConstraintViolationException($error, $errorNo, $sqlState, null, $query);
} elseif ($errorNo === 1298) {
return new UnknownMysqlTimezone($error, $errorNo, $sqlState, null, $query);
return new UnknownMysqlTimezoneException($error, $errorNo, $sqlState, null, $query);
} elseif ($query !== null) {
return new QueryException($error, $errorNo, $sqlState, null, $query);
} else {
Expand Down

0 comments on commit a5df924

Please sign in to comment.