DatabaseLockBackend::catchException

protected DatabaseLockBackend::catchException(\Exception $e)

Act on an exception when semaphore 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 semaphore is stale and the exception needs to propagate.

Parameters

$e: The exception.

Throws

\Exception

File

core/lib/Drupal/Core/Lock/DatabaseLockBackend.php, line 200

Class

DatabaseLockBackend
Defines the database lock backend. This is the default backend in Drupal.

Namespace

Drupal\Core\Lock

Code

protected function catchException(\Exception $e) {
  if ($this->database->schema()->tableExists(static::TABLE_NAME)) {
    throw $e;
  }
}
doc_Drupal
2016-10-29 08:59:46
Comments
Leave a Comment

Please login to continue.