function DatabaseBackend::catchException
Same name in this branch
- 9 core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::catchException()
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Flood/DatabaseBackend.php \Drupal\Core\Flood\DatabaseBackend::catchException()
- 11.x core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::catchException()
- 10 core/lib/Drupal/Core/Flood/DatabaseBackend.php \Drupal\Core\Flood\DatabaseBackend::catchException()
- 10 core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::catchException()
- 8.9.x core/lib/Drupal/Core/Flood/DatabaseBackend.php \Drupal\Core\Flood\DatabaseBackend::catchException()
- 8.9.x core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::catchException()
Act on an exception when flood might be stale.
If the table does not yet exist, that's fine, but if the table exists and yet the query failed, then the flood is stale and the exception needs to propagate.
Parameters
$e: The exception.
Throws
\Exception
File
-
core/
lib/ Drupal/ Core/ Flood/ DatabaseBackend.php, line 179
Class
- DatabaseBackend
- Defines the database flood backend. This is the default Drupal backend.
Namespace
Drupal\Core\FloodCode
protected function catchException(\Exception $e) {
if ($this->connection
->schema()
->tableExists(static::TABLE_NAME)) {
throw $e;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.