diff options
author | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
commit | bf6655a534a6775d30cafa67bd801276bda1d98d (patch) | |
tree | c6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/dbal/src/Driver/OCI8/Exception | |
parent | 94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff) | |
download | AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip |
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/dbal/src/Driver/OCI8/Exception')
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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Driver\OCI8\Exception; | ||
6 | |||
7 | use Doctrine\DBAL\Driver\AbstractException; | ||
8 | |||
9 | use function assert; | ||
10 | use function oci_error; | ||
11 | |||
12 | /** | ||
13 | * @internal | ||
14 | * | ||
15 | * @psalm-immutable | ||
16 | */ | ||
17 | final 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Driver\OCI8\Exception; | ||
6 | |||
7 | use Doctrine\DBAL\Driver\AbstractException; | ||
8 | |||
9 | use function assert; | ||
10 | use function oci_error; | ||
11 | |||
12 | /** | ||
13 | * @internal | ||
14 | * | ||
15 | * @psalm-immutable | ||
16 | */ | ||
17 | final 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Driver\OCI8\Exception; | ||
6 | |||
7 | use Doctrine\DBAL\Driver\AbstractException; | ||
8 | |||
9 | /** | ||
10 | * @internal | ||
11 | * | ||
12 | * @psalm-immutable | ||
13 | */ | ||
14 | final 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Driver\OCI8\Exception; | ||
6 | |||
7 | use Doctrine\DBAL\Driver\AbstractException; | ||
8 | |||
9 | use function sprintf; | ||
10 | |||
11 | /** | ||
12 | * @internal | ||
13 | * | ||
14 | * @psalm-immutable | ||
15 | */ | ||
16 | final 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Driver\OCI8\Exception; | ||
6 | |||
7 | use Doctrine\DBAL\Driver\AbstractException; | ||
8 | |||
9 | use function sprintf; | ||
10 | |||
11 | /** | ||
12 | * @internal | ||
13 | * | ||
14 | * @psalm-immutable | ||
15 | */ | ||
16 | final 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 | } | ||