You are here

protected static function Cache::notifyException in MongoDB 7

Display an exception error message only once.

Parameters

\MongoException $e: The exception to notify to the user.

7 calls to Cache::notifyException()
Cache::attemptRemove in mongodb_cache/mongodb_cache_plugin.php
Attempt removing data from the collection, notifying on exceptions.
Cache::garbageCollection in mongodb_cache/mongodb_cache_plugin.php
Garbage collection for get() and getMultiple().
Cache::get in mongodb_cache/mongodb_cache_plugin.php
Cache::getMultiple in mongodb_cache/mongodb_cache_plugin.php
Cache::isEmpty in mongodb_cache/mongodb_cache_plugin.php

... See full list

File

mongodb_cache/mongodb_cache_plugin.php, line 113

Class

Cache
MongoDB cache implementation.

Namespace

Drupal\mongodb_cache

Code

protected static function notifyException(\MongoException $e) {
  if (!self::$isExceptionNotified) {
    drupal_set_message(t('MongoDB cache problem %exception.', [
      '%exception' => $e
        ->getMessage(),
    ]), 'error');
    self::$isExceptionNotified = TRUE;
  }
}