function protected static function CdnProviderBase::checkCdnExceptions

8.x-3.x CdnProviderBase.php protected static CdnProviderBase::checkCdnExceptions(ProviderInterface $provider, $reset = TRUE)

Handles any CDN Provider exceptions that may have been thrown.


\Drupal\bootstrap\Plugin\Provider\ProviderInterface $provider: A CDN Provider to check.

bool $reset: Flag indicating whether to remove the Exceptions once they have been retrieved.

Return value

bool TRUE if there are exceptions, FALSE otherwise.


A base class for CDN Provider settings.



Source src/Plugin/Setting/Advanced/Cdn/CdnProviderBase.php (line 68)

protected static function checkCdnExceptions(ProviderInterface $provider, $reset = TRUE) {
  $exceptions = $provider->getCdnExceptions($reset);
  if ($exceptions) {
    Bootstrap::message(t('Unable to parse @provider data. <a href=":logs">Check the logs for more details.</a> If your issues are network related, consider using the "custom" CDN Provider instead to statically set the URLs that should be used.', [
      ':logs' => Url::fromRoute('dblog.overview')->toString(),
      '@provider' => $provider->getLabel(),
    ]), 'error');
    foreach ($exceptions as $exception) {
      watchdog_exception('bootstrap', $exception);
  return !!$exceptions;