Skip to content

Internals Database Exceptions ProviderException

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

database\exceptions\ProviderException

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/database/exceptions/ProviderException.php · Snapshot 8411f4287706.

DatabaseManager delegates SQL generation to QueryBuilder, execution to IProvider, and result caching to ICache. Schema builders use MySQL DDL and the framework table registry.

Imports and dependencies

use database\interface\IProvider;
use exception\ExceptionBase;

ProviderException

Declaration and architectural role

class ProviderException extends ExceptionBase

Constants, enum cases, traits and properties

Declarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.

Member Declaration Purpose or source contract
$provider private string $provider; Used by __construct(), buildMessage().
Constructor-promoted public function __construct(string $provider Initialized from the constructor argument; default expression is evaluated when the argument is omitted.

Method index

Method Signature
__construct public function __construct(string $provider, ?\Throwable $previous = null)
buildMessage public function buildMessage(): string

__construct

Source line 11

public function __construct(string $provider, ?\Throwable $previous = null)

Parameters

Parameter Type, modifiers and default Purpose
$provider string $provider Database execution collaborator; transactions require ITransactionalProvider.
$previous ?\Throwable $previous = null Operation input; the exact use, validation and propagation are shown in the implementation trace.

State writes: $this->provider.

Implementation, validation guards and interaction order
public function __construct(string $provider, ?\Throwable $previous = null)
    {
        $this->provider = $provider;
        parent::__construct($previous);
    }

buildMessage

Source line 17

public function buildMessage(): string

Return expressions (including local callbacks): "Database error has occurred with provider {$this->provider} within {$this->context->contextName}.".

Implementation, validation guards and interaction order
public function buildMessage(): string
    {
        return "Database error has occurred with provider {$this->provider} within {$this->context->contextName}.";
    }

Related types

Clone this wiki locally