Skip to content

ConnectionException

The ConnectionException is thrown when a database connection error occurs. This exception helps handle failures in establishing a database connection in the Sparkle package.

Namespace

php
use Sirmerdas\Sparkle\Exceptions\ConnectionException;

Exception Usage

This exception is used when there is an issue connecting to the database.

Example Usage

php
use Sirmerdas\Sparkle\Exceptions\ConnectionException;

try {
    Manager::boot();
} catch (ConnectionException $e) {
    echo "Connection error: " . $e->getMessage();
}

Released under the MIT License.