function DatabaseEventSubscriber::onStatementExecutionFailure

Same name in other branches
  1. 11.x core/modules/system/tests/modules/database_test/src/EventSubscriber/DatabaseEventSubscriber.php \Drupal\database_test\EventSubscriber\DatabaseEventSubscriber::onStatementExecutionFailure()

Subscribes to a statement execution failure event.

Parameters

\Drupal\Core\Database\Event\StatementExecutionFailureEvent $event: The database event.

File

core/modules/system/tests/modules/database_test/src/EventSubscriber/DatabaseEventSubscriber.php, line 74

Class

DatabaseEventSubscriber
Responds to database API events.

Namespace

Drupal\database_test\EventSubscriber

Code

public function onStatementExecutionFailure(StatementExecutionFailureEvent $event) : void {
    unset($this->statementIdsInExecution[$event->statementObjectId]);
    $this->countStatementFailures++;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.