Lines 100.00% 1 / 1
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
ConnectionException 100.00% 1 / 1 100.00% 1 / 1 1 100.00% 1 / 1
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace BlueprintAU\Radiant\Database\Exceptions;
6
7/**
8 * Thrown when a connection to the database cannot be established.
9 *
10 * Carries the underlying \PDOException as the previous exception so the
11 * host framework can log the full driver-level context.
12
13 * The package reports; the host logs.
14 */
15final class ConnectionException extends \RuntimeException
16{
17    /**
18     * @param  string  $message
19     * @param  int  $code
20     * @param  \Throwable|null  $previous
21     */
22    public function __construct(
23        string $message,
24        int $code = 0,
25        ?\Throwable $previous = null,
26    ) {
27        parent::__construct($message, $code, $previous);
28    }
29}