Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

DatabaseException.php
Go to the documentation of this file.
1 <?php
2
7 declare(strict_types=1);
8
9 namespace eZ\Publish\Core\Base\Exceptions;
10
11 use RuntimeException;
12 use Throwable;
13
17 final class DatabaseException extends RuntimeException
18 {
19 public const DEFAULT_MESSAGE = 'Database error';
20
21 public static function wrap(
22 Throwable $previous,
23 string $message = self::DEFAULT_MESSAGE,
24 int $code = 0
25 ): self {
26 return new self($message, $code, $previous);
27 }
28 }
eZ\Publish\Core\Base\Exceptions\DatabaseException
An exception that is thrown when the database encounters an error.
Definition: DatabaseException.php:18
eZ\Publish\Core\Base\Exceptions\DatabaseException\wrap
static wrap(Throwable $previous, string $message=self::DEFAULT_MESSAGE, int $code=0)
Definition: DatabaseException.php:21
eZ\Publish\Core\Base\Exceptions\DatabaseException\DEFAULT_MESSAGE
const DEFAULT_MESSAGE
Definition: DatabaseException.php:19
eZ\Publish\Core\Base\Exceptions
Definition: Core/Base/Exceptions/BadStateException.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.