DatabaseException
final class DatabaseException extends RuntimeException (View source)
Represents invalid database configuration or use that prevents a driver operation from proceeding.
Methods
Creates an exception for a failed physical connection while retaining the driver error as its cause.
Creates an exception that preserves both failed SQL and the original driver failure.
Creates an exception for a driver lacking a registered framework implementation.
Creates an exception for configuration that cannot form a usable database service.
Details
connectionFailed
static DatabaseException
connectionFailed(string $message, Throwable|null $previous = null)
Creates an exception for a failed physical connection while retaining the driver error as its cause.
queryFailed
static DatabaseException
queryFailed(string $sql, string $message, Throwable|null $previous = null)
Creates an exception that preserves both failed SQL and the original driver failure.
unsupportedDriver
static DatabaseException
unsupportedDriver(string $driver)
Creates an exception for a driver lacking a registered framework implementation.
invalidConfiguration
static DatabaseException
invalidConfiguration(string $message)
Creates an exception for configuration that cannot form a usable database service.