Documentation

No matching pages.

API

Config

Facade

Lifecycle

Class: DatabaseExceptionOccurred

Full name: Azera\Db\Event\DatabaseExceptionOccurred

Dispatched when a PDO exception is caught and being processed by Database::processPdoException().

Listeners can use this for error logging, alerting, or metrics. The exception may be re-thrown after processing; this event fires before that decision is made.

Public Properties

  • public readonly PDOException $exception ·
  • public readonly string|null $sql ·
  • public readonly array|null $params ·
  • public readonly Database $database ·

Public methods

__construct() ·

public function __construct(Azera\Db\Database $database, PDOException $exception, string|null $sql = null, array|null $params = null): mixed

Parameters

Name Type Default Description
$database Database -
$exception PDOException -
$sql string|null null
$params array|null null

Return value

  • Type: mixed

Back to the Index