summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Driver/OCI8/Exception
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/OCI8/Exception
parent94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff)
downloadAppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/dbal/src/Driver/OCI8/Exception')
-rw-r--r--vendor/doctrine/dbal/src/Driver/OCI8/Exception/ConnectionFailed.php26
-rw-r--r--vendor/doctrine/dbal/src/Driver/OCI8/Exception/Error.php27
-rw-r--r--vendor/doctrine/dbal/src/Driver/OCI8/Exception/InvalidConfiguration.php20
-rw-r--r--vendor/doctrine/dbal/src/Driver/OCI8/Exception/NonTerminatedStringLiteral.php27
-rw-r--r--vendor/doctrine/dbal/src/Driver/OCI8/Exception/UnknownParameterIndex.php24
5 files changed, 124 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Driver/OCI8/Exception/ConnectionFailed.php b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/ConnectionFailed.php
new file mode 100644
index 0000000..cefe9a3
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/ConnectionFailed.php
@@ -0,0 +1,26 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\OCI8\Exception;
6
7use Doctrine\DBAL\Driver\AbstractException;
8
9use function assert;
10use function oci_error;
11
12/**
13 * @internal
14 *
15 * @psalm-immutable
16 */
17final class ConnectionFailed extends AbstractException
18{
19 public static function new(): self
20 {
21 $error = oci_error();
22 assert($error !== false);
23
24 return new self($error['message'], null, $error['code']);
25 }
26}
diff --git a/vendor/doctrine/dbal/src/Driver/OCI8/Exception/Error.php b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/Error.php
new file mode 100644
index 0000000..6abdf23
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/Error.php
@@ -0,0 +1,27 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\OCI8\Exception;
6
7use Doctrine\DBAL\Driver\AbstractException;
8
9use function assert;
10use function oci_error;
11
12/**
13 * @internal
14 *
15 * @psalm-immutable
16 */
17final class Error extends AbstractException
18{
19 /** @param resource $resource */
20 public static function new($resource): self
21 {
22 $error = oci_error($resource);
23 assert($error !== false);
24
25 return new self($error['message'], null, $error['code']);
26 }
27}
diff --git a/vendor/doctrine/dbal/src/Driver/OCI8/Exception/InvalidConfiguration.php b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/InvalidConfiguration.php
new file mode 100644
index 0000000..e9d2d0e
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/InvalidConfiguration.php
@@ -0,0 +1,20 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\OCI8\Exception;
6
7use Doctrine\DBAL\Driver\AbstractException;
8
9/**
10 * @internal
11 *
12 * @psalm-immutable
13 */
14final class InvalidConfiguration extends AbstractException
15{
16 public static function forPersistentAndExclusive(): self
17 {
18 return new self('The "persistent" parameter and the "exclusive" driver option are mutually exclusive');
19 }
20}
diff --git a/vendor/doctrine/dbal/src/Driver/OCI8/Exception/NonTerminatedStringLiteral.php b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/NonTerminatedStringLiteral.php
new file mode 100644
index 0000000..776728f
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/NonTerminatedStringLiteral.php
@@ -0,0 +1,27 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\OCI8\Exception;
6
7use Doctrine\DBAL\Driver\AbstractException;
8
9use function sprintf;
10
11/**
12 * @internal
13 *
14 * @psalm-immutable
15 */
16final class NonTerminatedStringLiteral extends AbstractException
17{
18 public static function new(int $offset): self
19 {
20 return new self(
21 sprintf(
22 'The statement contains non-terminated string literal starting at offset %d.',
23 $offset,
24 ),
25 );
26 }
27}
diff --git a/vendor/doctrine/dbal/src/Driver/OCI8/Exception/UnknownParameterIndex.php b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/UnknownParameterIndex.php
new file mode 100644
index 0000000..2cd3fe7
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/OCI8/Exception/UnknownParameterIndex.php
@@ -0,0 +1,24 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\OCI8\Exception;
6
7use Doctrine\DBAL\Driver\AbstractException;
8
9use function sprintf;
10
11/**
12 * @internal
13 *
14 * @psalm-immutable
15 */
16final class UnknownParameterIndex extends AbstractException
17{
18 public static function new(int $index): self
19 {
20 return new self(
21 sprintf('Could not find variable mapping with index %d, in the SQL statement', $index),
22 );
23 }
24}