protected function DatabaseStorage::catchException in Drupal 9
Act on an exception when the table might not have been created.
If the table does not yet exist, that's fine, but if the table exists and yet the query failed, then the exception needs to propagate.
Parameters
\Exception $e: The exception.
Throws
\Exception
8 calls to DatabaseStorage::catchException()
- DatabaseStorage::deleteAll in core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorage.php - Deletes all items from the key/value store.
- DatabaseStorage::deleteMultiple in core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorage.php - Deletes multiple items from the key/value store.
- DatabaseStorage::getAll in core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorage.php - Returns all stored key/value pairs in the collection.
- DatabaseStorage::has in core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorage.php - Returns whether a given key exists in the store.
- DatabaseStorage::rename in core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorage.php - Renames a key.
File
- core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorage.php, line 282
Class
- DatabaseStorage
- Defines a default key/value store implementation.
Namespace
Drupal\Core\KeyValueStoreCode
protected function catchException(\Exception $e) {
if ($this->connection
->schema()
->tableExists($this->table)) {
throw $e;
}
}