summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Driver/AbstractException.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
committerpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
commitbf6655a534a6775d30cafa67bd801276bda1d98d (patch)
treec6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/dbal/src/Driver/AbstractException.php
parent94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff)
downloadAppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/dbal/src/Driver/AbstractException.php')
-rw-r--r--vendor/doctrine/dbal/src/Driver/AbstractException.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Driver/AbstractException.php b/vendor/doctrine/dbal/src/Driver/AbstractException.php
new file mode 100644
index 0000000..367fc49
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/AbstractException.php
@@ -0,0 +1,36 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver;
6
7use Exception as BaseException;
8use Throwable;
9
10/**
11 * Abstract base implementation of the {@see DriverException} interface.
12 *
13 * @psalm-immutable
14 */
15abstract class AbstractException extends BaseException implements Exception
16{
17 /**
18 * @param string $message The driver error message.
19 * @param string|null $sqlState The SQLSTATE the driver is in at the time the error occurred, if any.
20 * @param int $code The driver specific error code if any.
21 * @param Throwable|null $previous The previous throwable used for the exception chaining.
22 */
23 public function __construct(
24 string $message,
25 private readonly ?string $sqlState = null,
26 int $code = 0,
27 ?Throwable $previous = null,
28 ) {
29 parent::__construct($message, $code, $previous);
30 }
31
32 public function getSQLState(): ?string
33 {
34 return $this->sqlState;
35 }
36}