class DatabaseException
    extends RuntimeException

Database exception that wraps driver-specific errors.

This exception provides a unified interface for handling database errors from different drivers (PDO, mysqli, SQLite3).

Methods§

public function __construct(
    string $message,
    int|null $driverErrorCode = null,
    int $code = 0,
    Throwable|null $previous = null,
)

Parameters

$messagestringException message.
$driverErrorCodeint|nullDriver-specific error code.
$codeintException code.
$previousThrowable|nullPrevious exception.
Test cases 4
Calls 1
  • static-call RuntimeException::__construct() line 35

Private surface 1§

Implementation details, listed for orientation only.

private ?int $driverErrorCode

Test cases 13§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4
Other tests reaching this symbol 9

Relations§

Instantiated in 3
Type declarations 1